skip to main content
10.1145/3576915.3623154acmconferencesArticle/Chapter ViewAbstractPublication PagesccsConference Proceedingsconference-collections
research-article

Lost along the Way: Understanding and Mitigating Path-Misresolution Threats to Container Isolation

Published:21 November 2023Publication History

ABSTRACT

Filesystem isolation enforced by today's container technology has been found to be less effective in the presence of host-container interactions increasingly utilized by container tools. This weakened isolation has led to a type of path misresolution (Pamir) vulnerabilities, which have been considered to be highly risky and continuously reported over the years. In this paper, we present the first systematic study on the Pamir risk and the existing fixes to related vulnerabilities. Our research reveals that in spite of significant efforts being made to patch vulnerable container tools and address the risk, the Pamir vulnerabilities continue to be discovered, including a new vulnerability (CVE-2023-0778) we rediscovered from patched software. A key insight of our study is that the Pamir risk is inherently hard to prevent at the level of container tools, due to their heavy reliance on third-party components. While security inspections should be applied to all components to mediate host-container interactions, third-party component developers tend to believe that container tools should perform security checks before invoking their components, and are therefore reluctant to patch their code with the container-specific protection. Moreover, due to the large number of components today's container tools depend on, re-implementing all of them is impractical.

Our study shows that kernel-based filesystem isolation is the only way to ensure isolation always in place during host-container interactions. In our research, we design and implement the first such an approach that extends the filesystem isolation to dentry objects, by enforcing access control on host-container interactions through the filesystem. Our design addresses the fundamental limitation of one-way isolation characterizing today's container, uses carefully-designed policies to ensure accurate and comprehensive interaction control, and implants the protection into the right kernel location to minimize the performance impact. We verify our approach using model checking, which demonstrates its effectiveness in eliminating the Pamir risk. Our evaluation further shows that our approach incurs negligible overheads, vastly outperforming all existing Pamir patches, and maintains compatibility with all mainstream container tools. We have released our code and filed a request to incorporate our technique into the Linux kernel.

References

  1. Add continuous integration to your container builds. https://learn.microsoft. com/en-us/azure-sphere/app-development/continuous-integration.Google ScholarGoogle Scholar
  2. Auto-reloading for /etc/nsswitch.conf. https://sourceware.org/bugzilla/show_ bug.cgi?id=12459.Google ScholarGoogle Scholar
  3. cgroups(7) - Linux manual page. https://man7.org/linux/man-pages/man7/ cgroups.7.html.Google ScholarGoogle Scholar
  4. chroot(2) - Linux manual page. https://man7.org/linux/man-pages/man2/chroot. 2.html.Google ScholarGoogle Scholar
  5. containerd: An industry-standard container runtime with an emphasis on simplicity, robustness and portability. https://containerd.io/.Google ScholarGoogle Scholar
  6. Containers vs. virtual machines. https://learn.microsoft.com/enus/virtualization/windowscontainers/about/containers-vs-vm.Google ScholarGoogle Scholar
  7. CVE-2017--1002101. https://kubernetes.io/blog/2018/04/04/fixing-subpathvolume-vulnerability/.Google ScholarGoogle Scholar
  8. CVE-2019--14271 loading of nsswitch based config inside chroot under Glib. https://github.com/containers/buildah/issues/2740.Google ScholarGoogle Scholar
  9. CVE-2019--5736: Runc uses more memory during start up after the fix. https: //github.com/opencontainers/runc/issues/1980.Google ScholarGoogle Scholar
  10. daemon: pause containers before doing filesystem operations. https://github. com/moby/moby/pull/39252.Google ScholarGoogle Scholar
  11. Definitions of the actions. https://sites.google.com/view/container-isolation/ paper-appendix/b.Google ScholarGoogle Scholar
  12. Docker: Accelerated, Containerized Application Development. https://www. docker.com/.Google ScholarGoogle Scholar
  13. Docker Hub. https://hub.docker.com/.Google ScholarGoogle Scholar
  14. Docker storage drivers. https://docs.docker.com/storage/storagedriver/selectstorage-driver/.Google ScholarGoogle Scholar
  15. FileBench. http://www.nfsv4bat.org/Documents/nasconf/2004/filebench.pdf.Google ScholarGoogle Scholar
  16. filepath-securejoin. https://github.com/cyphar/filepath-securejoin.Google ScholarGoogle Scholar
  17. go-callvis. https://github.com/ofabry/go-callvis.Google ScholarGoogle Scholar
  18. Go Packages. https://pkg.go.dev/.Google ScholarGoogle Scholar
  19. gVisor: The Container Security Platform. https://gvisor.dev/.Google ScholarGoogle Scholar
  20. Kata Containers. https://katacontainers.io/.Google ScholarGoogle Scholar
  21. Kubernetes. https://kubernetes.io/.Google ScholarGoogle Scholar
  22. Kubernetes Volumes. https://kubernetes.io/docs/concepts/storage/volumes/.Google ScholarGoogle Scholar
  23. Managing dependencies - The Go Programming Language. https://go.dev/doc/ modules/managing-dependencies.Google ScholarGoogle Scholar
  24. mount(8) - Linux manual page. https://man7.org/linux/man-pages/man8/mount. 8.html.Google ScholarGoogle Scholar
  25. mount_namespaces(7) - Linux manual page. https://man7.org/linux/man-pages/ man7/mount_namespaces.7.html.Google ScholarGoogle Scholar
  26. opencontainers/runc. https://github.com/opencontainers/runc.Google ScholarGoogle Scholar
  27. Patrol. https://github.com/CGCL-codes/Patrol.Google ScholarGoogle Scholar
  28. pivot_root(2) - Linux manual page. https://man7.org/linux/man-pages/man2/ pivot_root.2.html.Google ScholarGoogle Scholar
  29. Podman. https://podman.io/.Google ScholarGoogle Scholar
  30. Podman issues about the CVE-2018--15664. https://github.com/containers/ podman/pull/3214.Google ScholarGoogle Scholar
  31. Proposal: path/filepath: addition of SecureJoin helper. https://github.com/golang/ go/issues/20126.Google ScholarGoogle Scholar
  32. Race Condition in crun. https://security.snyk.io/vuln/SNYK-ORACLE8-CRUN2585150.Google ScholarGoogle Scholar
  33. Rootless Containers. https://rootlesscontaine.rs/.Google ScholarGoogle Scholar
  34. SPEC. http://www.spec.org/index.html.Google ScholarGoogle Scholar
  35. Spin - Formal Verification. https://spinroot.com/spin/whatispin.html.Google ScholarGoogle Scholar
  36. Third-party dependencies of the container tools. https://sites.google.com/view/ container-isolation/paper-appendix/a.Google ScholarGoogle Scholar
  37. Windows Server Containers Are Open, and Here's How You Can Break Out. https: //unit42.paloaltonetworks.com/windows-server-containers-vulnerabilities/.Google ScholarGoogle Scholar
  38. Daniel P. Bovet and Marco Cesati. Understanding the Linux Kernel: from I/O ports to process management. O'Reilly Media, Inc., 2005.Google ScholarGoogle Scholar
  39. Thanh Bui. Analysis of docker security. arXiv preprint arXiv:1501.02967, 2015.Google ScholarGoogle Scholar
  40. R. Joseph Connor, Tyler McDaniel, Jared M. Smith, and Max Schuchard. PKU Pitfalls: Attacks on PKU-based Memory Isolation Systems. In Proceedings of 29th USENIX Security Symposium, pages 1409--1426, 2020.Google ScholarGoogle Scholar
  41. Guillaume Everarts de Velp, Etienne Rivière, and Ramin Sadre. Understanding the performance of container execution environments. In Proceedings of the 6th International Workshop on Container Technologies and Container Clouds, pages 37--42, 2020.Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Andy Galloway, Gerald Lüttgen, Jan Tobias Mühlberg, and Radu I Siminiceanu. Model-checking the linux virtual file system. In Proceedings of the 10th International Conference on Verification, Model Checking, and Abstract Interpretation, pages 74--88, 2009.Google ScholarGoogle Scholar
  43. Xing Gao, Zhongshu Gu, Mehmet Kayaalp, Dimitrios Pendarakis, and Haining Wang. Containerleaks: Emerging security threats of information leakages in container clouds. In Proceedings of the 47th Annual IEEE/IFIP International Conference on Dependable Systems and Networks, pages 237--248, 2017.Google ScholarGoogle ScholarCross RefCross Ref
  44. Xing Gao, Zhongshu Gu, Zhengfa Li, Hani Jamjoom, and Cong Wang. Houdini's escape: Breaking the resource rein of linux control groups. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pages 1073--1086, 2019.Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. John L. Henning. Spec cpu2006 benchmark descriptions. ACM SIGARCH Computer Architecture News, 34(4):1--17, 2006.Google ScholarGoogle Scholar
  46. Zhiqiang Jian and Long Chen. A defense method against docker escape attack. In Proceedings of the 2017 International Conference on Cryptography, Security and Privacy, pages 142--146, 2017.Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Paul Luo Li, Amy J. Ko, and Jiamin Zhu. What makes a great software engineer? In Proceedings of the 37th IEEE International Conference on Software Engineering, pages 700--710, 2015.Google ScholarGoogle ScholarCross RefCross Ref
  48. Xin Lin, Lingguang Lei, Yuewu Wang, Jiwu Jing, Kun Sun, and Quan Zhou. A measurement study on linux container security: Attacks and countermeasures. In Proceedings of the 34th Annual Computer Security Applications Conference, pages 418--429, 2018.Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Antony Martin, Simone Raponi, Théo Combe, and Roberto Di Pietro. Docker ecosystem--vulnerability analysis. Computer Communications, 122:30--43, 2018.Google ScholarGoogle ScholarCross RefCross Ref
  50. René Neumann. Using promela in a fully verified executable ltl model checker. In Proceedings of the 6th International Conference on Verified Software: Theories, Tools and Experiments, pages 105--114, 2014.Google ScholarGoogle ScholarCross RefCross Ref
  51. Elena Reshetova, Janne Karhunen, Thomas Nyman, and N. Asokan. Security of os-level virtualization technologies. In Proceedings of the 2014 Nordic Conference on Secure IT Systems, pages 77--93, 2014.Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. David Schrammel, Samuel Weiser, Richard Sadek, and Stefan Mangard. Jenny: Securing Syscalls for PKU-based Memory Isolation Systems. In Proceedings of the 31st USENIX Security Symposium, pages 936--952, 2022.Google ScholarGoogle Scholar
  53. Yuqiong Sun, David Safford, Mimi Zohar, Dimitrios Pendarakis, Zhongshu Gu, and Trent Jaeger. Security namespace: making linux security frameworks available to containers. In Proceedings of the 27th USENIX Security Symposium, pages 1423--1439, 2018.Google ScholarGoogle Scholar
  54. Gang Tan. Principles and implementation techniques of software-based fault isolation. Foundations and Trends in Privacy and Security, 1(3):137--198, 2017.Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Chia-Che Tsai, Yang Zhan, Jayashree Reddy, Yizheng Jiao, Tao Zhang, and Donald E. Porter. How to get more value from your file system directory cache. In Proceedings of the 25th Symposium on Operating Systems Principles, pages 441--456, 2015.Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Alexios Voulimeneas, Jonas Vinck, Ruben Mechelinck, and Stijn Volckaert. You shall not (by) pass! practical, secure, and fast PKU-based sandboxing. In Proceedings of the Seventeenth European Conference on Computer Systems, pages 266--282, 2022.Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. Bowen Xu, Le An, Ferdian Thung, Foutse Khomh, and David Lo. Why reinventing the wheels? an empirical study on library reuse and re-implementation. Empirical Software Engineering, 25:755--789, 2020.Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Lost along the Way: Understanding and Mitigating Path-Misresolution Threats to Container Isolation

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      CCS '23: Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security
      November 2023
      3722 pages
      ISBN:9798400700507
      DOI:10.1145/3576915

      Copyright © 2023 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 21 November 2023

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate1,261of6,999submissions,18%

      Upcoming Conference

      CCS '24
      ACM SIGSAC Conference on Computer and Communications Security
      October 14 - 18, 2024
      Salt Lake City , UT , USA
    • Article Metrics

      • Downloads (Last 12 months)462
      • Downloads (Last 6 weeks)104

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader