skip to main content
10.1145/3627106.3627113acmotherconferencesArticle/Chapter ViewAbstractPublication PagesConference Proceedings
research-article
Open Access
Artifacts Evaluated & Functional / v1.1

DOPE: DOmain Protection Enforcement with PKS

Published:04 December 2023Publication History

ABSTRACT

The number of Linux kernel vulnerabilities discovered has increased drastically over the past years. In the kernel, even simple memory safety vulnerabilities can have devastating consequences, e.g., compromising the entire system. Efforts to mitigate these vulnerabilities have so far focused mainly on control-flow hijacking attacks in the kernel. Yet, data-oriented attacks remain largely unmitigated in practice as existing mitigations are limited in providing robust security guarantees at reasonable performance overhead for multiple sensitive data objects.

In this paper, we present DOmain Protection Enforcement (DOPE), a novel kernel mitigation to protect against data-oriented attacks leveraging Intel’s new hardware feature PKS. DOPE enforces domain protection, restricting memory access to sensitive data during kernel space execution based on the principle of least privilege. Hence, in case of an exploitable kernel bug, an attacker is prevented from using sensitive data for privilege escalation. We demonstrate DOPE’s effectiveness and usefulness by implementing a proof-of-concept, protecting eight selected sensitive data objects. The proof-of-concept is realized as compiler-assisted and hardware-enforced kernel mitigation. It consists of less than 5000 lines of code on the Linux kernel 5.19 and LLVM clang 15.0.1. Our evaluation on real hardware shows an average runtime overhead of for real-world user applications. Lastly, we systematically analyze 11 state-of-the-art kernel mitigations against data-oriented attacks and illustrate that DOPE is a significant improvement in terms of security with respect to performance.

References

  1. Martín Abadi, Mihai Budiu, Ulfar Erlingsson, and Jay Ligatti. 2005. Control-Flow Integrity. In CCS.Google ScholarGoogle Scholar
  2. Martín Abadi, Mihai Budiu, Úlfar Erlingsson, and Jay Ligatti. 2009. Control-flow integrity principles, implementations, and applications. TISSEC (2009).Google ScholarGoogle Scholar
  3. Periklis Akritidis, Cristian Cadar, Costin Raiciu, Manuel Costa, and Miguel Castro. 2008. Preventing Memory Error Exploits with WIT. In S&P.Google ScholarGoogle Scholar
  4. Khalid Aziz. 2019. Add support for eXclusive Page Frame Ownership. https://lwn.net/Articles/779818/Google ScholarGoogle Scholar
  5. Brian Belleville, Hyungon Moon, Jangseop Shin, Dongil Hwang, Joseph M Nash, Seonhwa Jung, Yeoul Na, Stijn Volckaert, Per Larsen, Yunheung Paek, 2018. Hardware assisted randomization of data. In RAID.Google ScholarGoogle Scholar
  6. Sandeep Bhatkar and R Sekar. 2008. Data space randomization. In DIMVA.Google ScholarGoogle Scholar
  7. Tyler K. Bletsch, Xuxian Jiang, Vincent W. Freeh, and Zhenkai Liang. 2011. Jump-oriented programming: a new class of code-reuse attack. In AsiaCCS.Google ScholarGoogle Scholar
  8. Neil Brown. 2015. RCU-walk: faster pathname lookup in Linux. https://lwn.net/Articles/649729/Google ScholarGoogle Scholar
  9. Erik Buchanan, Ryan Roemer, Hovav Shacham, and Stefan Savage. 2008. When Good Instructions Go Bad: Generalizing Return-Oriented Programming to RISC. In ACM Conference on Computer and Communications Security (CCS).Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cristian Cadar, Periklis Akritidis, Manuel Costa, Jean-Phillipe Martin, and Miguel Castro. 2008. Data randomization. (2008).Google ScholarGoogle Scholar
  11. Nicholas Carlini and David A. Wagner. 2014. ROP is Still Dangerous: Breaking Modern Defenses. In USENIX Security.Google ScholarGoogle Scholar
  12. Miguel Castro, Manuel Costa, and Tim Harris. 2006. Securing software by enforcing data-flow integrity. In OSDI.Google ScholarGoogle Scholar
  13. Ping Chen, Jun Xu, Zhiqiang Lin, Dongyan Xu, Bing Mao, and Peng Liu. 2015. A Practical Approach for Adaptive Data Structure Layout Randomization. In European Symposium on Research in Computer Security.Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Quan Chen, Ahmed M. Azab, Guruprasad Ganesh, and Peng Ning. 2017. PrivWatcher: Non-Bypassable Monitoring and Protection of Process Credentials from Memory Corruption Attacks. In AsiaCCS.Google ScholarGoogle Scholar
  15. Shuo Chen, Jun Xu, Emre Can Sezer, Prachi Gauriar, and Ravishankar K Iyer. 2005. Non-Control-Data Attacks Are Realistic Threats.. In USENIX Security.Google ScholarGoogle Scholar
  16. Chromium. 2018. PartitionAlloc Design. https://chromium.googlesource.com/chromium/src/+/lkcr/base/allocator/partition_allocator/PartitionAlloc.mdGoogle ScholarGoogle Scholar
  17. R. Joseph Connor, Tyler McDaniel, Jared M. Smith, and Max Schuchard. 2020. PKU Pitfalls: Attacks on PKU-based Memory Isolation Systems. In USENIX Security Symposium.Google ScholarGoogle Scholar
  18. Jonathan Corbet. 2012. Supervisor mode access prevention. https://lwn.net/Articles/517475/Google ScholarGoogle Scholar
  19. Jonathan Corbet. 2016. Defending against Rowhammer in the kernel. https://lwn.net/Articles/704920/Google ScholarGoogle Scholar
  20. Jonathan Corbet. 2016. Exclusive page-frame ownership. https://lwn.net/Articles/700647/Google ScholarGoogle Scholar
  21. Jonathan Corbet. 2018. Kernel support for control-flow enforcement. https://lwn.net/Articles/758245/Google ScholarGoogle Scholar
  22. Jonathan Corbet. 2020. Memory protection keys for the kernel. https://lwn.net/Articles/826554/Google ScholarGoogle Scholar
  23. Jonathan Corbet. 2022. Seeking an API for protection keys supervisor. https://lwn.net/Articles/894531/Google ScholarGoogle Scholar
  24. Jonathan Corbet. 2022. Solutions for direct-map fragmentation. https://lwn.net/Articles/894557/Google ScholarGoogle Scholar
  25. Standard Performance Evaluation Corporation. 2017. SPEC CPU 2017. https://www.spec.org/cpu2017/Google ScholarGoogle Scholar
  26. John Criswell, Nathan Dautenhahn, and Vikram Adve. 2014. KCoFI: Complete Control-Flow Integrity for Commodity Operating System Kernels. In S&P.Google ScholarGoogle Scholar
  27. Cyril Hrubis. 2022. Linux Test Project. https://github.com/linux-test-project/ltpGoogle ScholarGoogle Scholar
  28. Lucas Davi, David Gens, Christopher Liebchen, and Ahmad-Reza Sadeghi. 2017. PT-Rand: Practical Mitigation of Data-only Attacks against Page Tables. In NDSS.Google ScholarGoogle Scholar
  29. Jake Edge. 2011. Extending the use of RO and NX. https://lwn.net/Articles/422487/Google ScholarGoogle Scholar
  30. Jake Edge. 2013. Kernel address space layout randomization. https://lwn.net/Articles/569635/Google ScholarGoogle Scholar
  31. Jake Edge. 2020. Control-flow integrity for the kernel. https://lwn.net/Articles/810077/Google ScholarGoogle Scholar
  32. Alexander J. Gaidis, Joao Moreira, Ke Sun, Alyssa Milburn, Vaggelis Atlidakis, and Vasileios P. Kemerlis. 2023. FineIBT: Fine-grain Control-flow Enforcement with Indirect Branch Tracking. arXiv:2303.16353 (2023).Google ScholarGoogle Scholar
  33. Xinyang Ge, Nirupama Talele, Mathias Payer, and Trent Jaeger. 2016. Fine-Grained Control-Flow Integrity for Kernel Software. In Euro S&P.Google ScholarGoogle Scholar
  34. Daniel Gruss, Clémentine Maurice, Klaus Wagner, and Stefan Mangard. 2016. Flush+Flush: A Fast and Stealthy Cache Attack. In DIMVA.Google ScholarGoogle Scholar
  35. Daniel Gruss, Michael Schwarz, and Moritz Lipp. 2018. Meltdown: Basics, Details, Consequences. In Black Hat USA.Google ScholarGoogle Scholar
  36. Jinyu Gu, Hao Li, Wentai Li, Yubin Xia, and Haibo Chen. 2022. EPK: Scalable and Efficient Memory Protection Keys. In USENIX Security.Google ScholarGoogle Scholar
  37. Hong Hu, Shweta Shinde, Sendroiu Adrian, Zheng Leong Chua, Prateek Saxena, and Zhenkai Liang. 2016. Data-oriented programming: On the expressiveness of non-control data attacks. In S&P.Google ScholarGoogle Scholar
  38. Ralf Hund, Thorsten Holz, and Felix C. Freiling. 2009. Return-Oriented Rootkits: Bypassing Kernel Code Integrity Protection Mechanisms. In USENIX Security.Google ScholarGoogle Scholar
  39. Intel. 2019. Intel 64 and IA-32 Architectures Software Developer’s Manual, Volume 4: Model-Specific Registers.Google ScholarGoogle Scholar
  40. Vasileios P Kemerlis, Michalis Polychronakis, and Angelos D Keromytis. 2014. ret2dir: Rethinking kernel isolation. In USENIX Security.Google ScholarGoogle Scholar
  41. Vasileios P. Kemerlis, Georgios Portokalidis, and Angelos D. Keromytis. 2012. kGuard: Lightweight Kernel Protection against Return-to-User Attacks. In USENIX Security.Google ScholarGoogle Scholar
  42. kernel.org. 2009. Virtual memory map with 4 level page tables (x86_64). https://www.kernel.org/doc/Documentation/x86/x86_64/mm.txtGoogle ScholarGoogle Scholar
  43. Michael Kerrisk. 2021. capabilities(7) — Linux manual page. https://man7.org/linux/man-pages/man7/capabilities.7.html.Google ScholarGoogle Scholar
  44. Paul Kocher, Jann Horn, Anders Fogh, Daniel Genkin, Daniel Gruss, Werner Haas, Mike Hamburg, Moritz Lipp, Stefan Mangard, Thomas Prescher, Michael Schwarz, and Yuval Yarom. 2019. Spectre Attacks: Exploiting Speculative Execution. In S&P.Google ScholarGoogle Scholar
  45. Hiroki Kuzuno and Toshihiro Yamauchi. 2022. KDPM: Kernel Data Protection Mechanism Using a Memory Protection Key. International Workshop on Security (2022), 66–85.Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Hiroki Kuzuno and Toshihiro Yamauchi. 2022. Prevention of Kernel Memory Corruption Using Kernel Page Restriction Mechanism. Journal of Information Processing 30 (2022), 563–576.Google ScholarGoogle ScholarCross RefCross Ref
  47. Hugo Lefeuvre, Vlad-Andrei Bădoiu, Yi Chien, Felipe Huici, Nathan Dautenhahn, and Pierre Olivier. 2022. Assessing the Impact of Interface Vulnerabilities in Compartmentalized Software. In NDSS.Google ScholarGoogle Scholar
  48. Hugo Lefeuvre, Vlad-Andrei Bădoiu, Alexander Jung, Stefan Lucian Teodorescu, Sebastian Rauch, Felipe Huici, Costin Raiciu, and Pierre Olivier. 2022. FlexOS: Towards Flexible OS Isolation. In Architectural Support for Programming Languages and Operating Systems.Google ScholarGoogle Scholar
  49. Guanyu Li, Dong Du, and Yubin Xia. 2020. Iso-UniK: lightweight multi-process unikernel through memory protection keys. Cybersecurity 3 (2020), 11.Google ScholarGoogle ScholarCross RefCross Ref
  50. Zhenpeng Lin, Yuhang Wu, and Xinyu Xing. 2022. DirtyCred: Escalating Privilege in Linux Kernel. In ACM.Google ScholarGoogle Scholar
  51. Moritz Lipp, Andreas Kogler, David Oswald, Michael Schwarz, Catherine Easdon, Claudio Canella, and Daniel Gruss. 2021. PLATYPUS: Software-based Power Side-Channel Attacks on x86. In S&P.Google ScholarGoogle Scholar
  52. Yong Liu, Jun Yao, and Xiaodong Wang. 2022. USMA: Share Kernel Code with Me. In Black Hat Asia.Google ScholarGoogle Scholar
  53. LLVM. 2019. The LLVM Compiler Infrastructure. https://llvm.orgGoogle ScholarGoogle Scholar
  54. Derrick McKee, Yianni Giannaris, Carolina Ortega Perez, Howard Shrobe, Mathias Payer, Hamed Okhravi, and Nathan Burow. 2022. Preventing Kernel Hacks with HAKC. In NDSS.Google ScholarGoogle Scholar
  55. Paul McKenney. 2007. What is RCU, Fundamentally?https://lwn.net/Articles/262464/Google ScholarGoogle Scholar
  56. Larry McVoy and Carl Staelin. 1996. Lmbench: Portable Tools for Performance Analysis. In USENIX ATC.Google ScholarGoogle Scholar
  57. Joao Moreira. 2022. Kernel FineIBT Support. https://lwn.net/Articles/891976/Google ScholarGoogle Scholar
  58. João Moreira, Sandro Rigo, Michalis Polychronakis, and Vasileios Kemerlis. 2017. DROP THE ROP Fine-grained Control-flow Integrity for the Linux Kernel. In Black Hat Asia.Google ScholarGoogle Scholar
  59. James Morse. 2015. arm64: kernel: Add support for Privileged Access Never. https://lwn.net/Articles/651614/Google ScholarGoogle Scholar
  60. Soyeon Park, Sangho Lee, Wen Xu, HyunGon Moon, and Taesoo Kim. 2019. libmpk: Software Abstraction for Intel Memory Protection Keys (Intel MPK). In USENIX ATC.Google ScholarGoogle Scholar
  61. Phoronix. 2022. OpenBenchmarking. https://openbenchmarking.orgGoogle ScholarGoogle Scholar
  62. Sergej Proskurin, Marius Momeu, Seyedhamed Ghavamnia, Vasileios P. Kemerlis, and Michalis Polychronakis. 2020. xMP: Selective Memory Protection for Kernel and User Space. In S&P.Google ScholarGoogle Scholar
  63. Weizhong Qiang, Jiawei Yang, Hai Jin, and Xuanhua Shi. 2018. PrivGuard: Protecting Sensitive Kernel Data From Privilege Escalation Attacks. IEEE Access 6 (2018), 46584–46594.Google ScholarGoogle ScholarCross RefCross Ref
  64. Nick Roessler, Lucas Atayde, Imani Palmer, Derrick McKee, Jai Pandey, Vasileios P. Kemerlis, Mathias Payer, Adam Bates, Jonathan M. Smith, Andre DeHon, and Nathan Dautenhahn. 2021. uSCOPE: A Methodology for Analyzing Least-Privilege Compartmentalization in Large Software Artifacts. In RAID.Google ScholarGoogle Scholar
  65. Jerome H. Saltzer and Michael D. Schroeder. 1975. The protection of information in computer systems. Proc. IEEE 63, 9 (1975), 1278–1308.Google ScholarGoogle ScholarCross RefCross Ref
  66. Vasily A. Sartakov, Lluís Vilanova, and Peter Pietzuch. 2021. CubicleOS: A Library OS with Software Componentisation for Practical Isolation. In Architectural Support for Programming Languages and Operating Systems.Google ScholarGoogle Scholar
  67. David Schrammel, Samuel Weiser, Richard Sadek, and Stefan Mangard. 2022. Jenny: Securing Syscalls for PKU-based Memory Isolation Systems. In USENIX Security Symposium.Google ScholarGoogle Scholar
  68. David Schrammel, Samuel Weiser, Stefan Steinegger, Martin Schwarzl, Michael Schwarz, Stefan Mangard, and Daniel Gruss. 2020. Donky: Domain Keys–Efficient In-Process Isolation for RISC-V and x86. In USENIX Security.Google ScholarGoogle Scholar
  69. Mark Seaborn. 2015. Exploiting the DRAM rowhammer bug to gain kernel privileges. http://googleprojectzero.blogspot.com/2015/03/exploiting-dram-rowhammer-bug-to-gain.htmlGoogle ScholarGoogle Scholar
  70. Chengyu Song, Byoungyoung Lee, Kangjie Lu, William R. Harris, Taesoo Kim, and Wenke Lee. 2016. Enforcing Kernel Security Invariants with Data Flow Integrity. In NDSS.Google ScholarGoogle Scholar
  71. Mincheol Sung, Pierre Olivier, Stefan Lankes, and Binoy Ravindran. 2020. Intra-Unikernel Isolation with Intel Memory Protection Keys. In ACM.Google ScholarGoogle Scholar
  72. Yoo Sungbae, Park Jinbum, Kim Seolheui, Kim Yeji, and Kim Taesoo. 2022. In-Kernel Control-Flow Integrity on Commodity OSes using ARM Pointer Authentication. In USENIX Security.Google ScholarGoogle Scholar
  73. The Linux Kernel. 2021. File system drivers (Part 2). https://linux-kernel-labs.github.io/refs/heads/master/labs/filesystems_part2.htmlGoogle ScholarGoogle Scholar
  74. The Linux Kernel. 2022. Index Nodes. https://www.kernel.org/doc/html/latest/filesystems/ext4/inodes.htmlGoogle ScholarGoogle Scholar
  75. The Linux Kernel. 2022. Locking. https://www.kernel.org/doc/html/latest/filesystems/locking.htmlGoogle ScholarGoogle Scholar
  76. The Linux Kernel. 2022. Memory Allocation Guide. https://docs.kernel.org/core-api/memory-allocation.html?highlight=kmem_cache_allocGoogle ScholarGoogle Scholar
  77. The Linux Kernel. 2022. Memory Protection Keys. https://www.kernel.org/doc/html/latest/core-api/protection-keys.htmlGoogle ScholarGoogle Scholar
  78. Anjo Vahldiek-Oberwagner, Eslam Elnikety, Nuno O. Duarte, Michael Sammler, Peter Druschel, and Deepak Garg. 2019. ERIM: Secure and Efficient In-process Isolation with Memory Protection Keys. In USENIX Security.Google ScholarGoogle Scholar
  79. Alexios Voulimeneas, Jonas Vinck, Ruben Mechelinck, and Stijn Volckaert. 2022. You Shall Not (by)Pass! Practical, Secure, and Fast PKU-Based Sandboxing. In EuroSys.Google ScholarGoogle Scholar
  80. Emmett Witchel, Junghwan Rhee, and Krste Asanović. 2005. Mondrix: Memory Isolation for Linux Using Mondriaan Memory Protection. In ACM SIGOPS Operating Systems Review.Google ScholarGoogle ScholarDigital LibraryDigital Library
  81. Jidong Xiao, Hai Huang, and Haining Wang. 2015. Kernel data attack is a realistic security threat. In International Conference on Security and Privacy in Communication Systems.Google ScholarGoogle ScholarCross RefCross Ref
  82. Toshihiro Yamauchi, Yohei Akao, Ryota Yoshitani, Yuichi Nakamura, and Masaki Hashimoto. 2021. Additional kernel observer: privilege escalation attack prevention mechanism focusing on system call privilege changes. International Journal of Information Security 20 (2021).Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. DOPE: DOmain Protection Enforcement with PKS

    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 Other conferences
      ACSAC '23: Proceedings of the 39th Annual Computer Security Applications Conference
      December 2023
      836 pages
      ISBN:9798400708862
      DOI:10.1145/3627106

      Copyright © 2023 Owner/Author

      This work is licensed under a Creative Commons Attribution International 4.0 License.

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 4 December 2023

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed limited

      Acceptance Rates

      Overall Acceptance Rate104of497submissions,21%
    • Article Metrics

      • Downloads (Last 12 months)226
      • Downloads (Last 6 weeks)54

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format .

    View HTML Format