skip to main content
10.1145/3492321.3519578acmconferencesArticle/Chapter ViewAbstractPublication PageseurosysConference Proceedingsconference-collections

KASLR in the age of MicroVMs

Published:28 March 2022Publication History

ABSTRACT

Address space layout randomization (ASLR) is a widely used component of computer security aimed at preventing code reuse and/or data-only attacks. Modern kernels utilize kernel ASLR (KASLR) and finer-grained forms, such as functional granular KASLR (FGKASLR), but do so as part of an inefficient bootstrapping process we call bootstrap self-randomization. Meanwhile, under increasing pressure to optimize their boot times, microVM architectures such as AWS Firecracker have resorted to eliminating bootstrapping steps, particularly decompression and relocation from the guest kernel boot process, leaving them without KASLR. In this paper, we present in-monitor KASLR, in which the virtual machine monitor efficiently implements KASLR for the guest kernel by skipping the expensive kernel self-relocation steps. We prototype in-monitor KASLR and FGKASLR in the open-source Firecracker virtual machine monitor demonstrating, on a microVM configured kernel, boot times 22% and 16% faster than bootstrapped KASLR and FGKASLR methods, respectively. We also show the low overhead of in-monitor KASLR, with only 4% (2 ms) increase in boot times on average compared to a kernel without KASLR. We also discuss the implications and future opportunities for in-monitor approaches.

References

  1. [n. d.]. Apache OpenWhisk: Open Source Serverless Cloud Platform. http://openwhisk.apache.org/. (Accessed on 2021-01-04).Google ScholarGoogle Scholar
  2. [n. d.]. AWS Lambda. https://aws.amazon.com/lambda/. (Accessed on 2016-03-04).Google ScholarGoogle Scholar
  3. [n. d.]. Azure Functions Serverless Compute. https://azure.microsof.com/en-us/services/functions/. (Accessed on 2021-01-04).Google ScholarGoogle Scholar
  4. [n. d.]. Docker. http://docs.docker.io/en/latest/.Google ScholarGoogle Scholar
  5. [n. d.]. IBM Cloud Functions. https://www.ibm.com/cloud/functions. (Accessed on 2021-01-04).Google ScholarGoogle Scholar
  6. [n. d.]. Intel NEMU: Modern Hypervisor for the Cloud. https://github.com/intel/nemu.Google ScholarGoogle Scholar
  7. [n. d.]. Kata Containers: The speed of containers, the security of VMs. https://katacontainers.io/. (Accessed on 2021-01-04).Google ScholarGoogle Scholar
  8. [n. d.]. Kernel Samepage Merging. https://www.linux-kvm.org/page/KSM.Google ScholarGoogle Scholar
  9. [n. d.]. LING. http://erlangonxen.org.Google ScholarGoogle Scholar
  10. [n. d.]. Linux Containers. https://linuxcontainers.org/.Google ScholarGoogle Scholar
  11. 2015. Clive: Removing (most of) the software stack from the cloud. http://lsub.org/ls/clive.html.Google ScholarGoogle Scholar
  12. 2015. JavaScript library operating system for the cloud. http://runtimejs.org/.Google ScholarGoogle Scholar
  13. 2015. The Rumprun unikernel and toolchain for various platforms. https://github.com/rumpkernel/rumprun.Google ScholarGoogle Scholar
  14. 2020. pvh. https://xenbits.xen.org/docs/unstable/misc/pvh.html.Google ScholarGoogle Scholar
  15. 2020. THE LINUX/x86 BOOT PROTOCOL. https://www.kernel.org/doc/Documentation/x86/boot.rst.Google ScholarGoogle Scholar
  16. Martín Abadi, Mihai Budiu, Úlfar Erlingsson, and Jay Ligatti. 2005. Control-Flow Integrity. In Proc. of ACM CCS. Alexandria, VA.Google ScholarGoogle Scholar
  17. Kristen Carlson Accardi. 2020. Function Granular KASLR. https://lkml.org/lkml/2020/7/17/947.Google ScholarGoogle Scholar
  18. Alexandru Agache, Marc Brooker, Alexandra Iordache, Anthony Liguori, Rolf Neugebauer, Phil Piwonka, and Diana-Maria Popa. 2020. Firecracker: Lightweight Virtualization for Serverless Applications. In Proc. of USENIX NSDI. Santa Clara, CA.Google ScholarGoogle Scholar
  19. Istemi Ekin Akkus, Ruichuan Chen, Ivica Rimac, Manuel Stein, Klaus Satzke, Andre Beck, Paarijaat Aditya, and Volker Hilt. 2018. SAND: Towards High-Performance Serverless Computing. In Proc. of USENIX Annual Technical Conf. Boston, MA.Google ScholarGoogle Scholar
  20. Michael Backes and Stefan Nürnberger. 2014. Oxymoron: Making Fine-Grained Memory Randomization Practical by Allowing Code Sharing. In Proc. of USENIX Security. San Diego, CA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, and Andrew Warfield. 2003. Xen and the Art of Virtualization. In Proc. of ACM SOSP. Bolton Landing, NY.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Antonio Barresi, Kaveh Razavi, Mathias Payer, and Thomas R. Gross. 2015. CAIN: Silently Breaking ASLR in the Cloud. In Proc. of USENIX WOOT. Washington, D.C.Google ScholarGoogle Scholar
  23. John Baublitz, Nick Desaulniers, Alex Gaynor, Geoffrey Thomas, Josh Triplett, and Miguel Ojeda. 2020. Barriers to in-tree Rust. In Linux Plumbers Conference. Virtual Conference.Google ScholarGoogle Scholar
  24. Alfred Bratterud, Alf-Andre Walla, Hårek Haugerud, Paal E Engelstad, and Kyrre Begnum. 2015. IncludeOS: A minimal, resource efficient unikernel for cloud services. In Proc. of IEEE CloudCom. Vancouver,Canada.Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Roy Bryant, Alexey Tumanov, Olga Irzak, Adin Scannell, Kaustubh Joshi, Matti Hiltunen, H. Andrés Lagar-Cavilla, and Eyal de Lara. 2011. Kaleidoscope: Cloud Micro-Elasticity via VM State Coloring. In Proc. of ACM EuroSys. Salzburg, Austria.Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. James Cadden, Thomas Unger, Yara Awad, Han Dong, Orran Krieger, and Jonathan Appavoo. 2020. SEUSS: Skip Redundant Paths to Make Serverless Fast. In Proc. of ACM EuroSys. Heraklion, Greece.Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Claudio Canella, Daniel Genkin, Lukas Giner, Daniel Gruss, Moritz Lipp, Marina Minkin, Daniel Moghimi, Frank Piessens, Michael Schwarz, Berk Sunar, Jo Van Bulck, and Yuval Yarom. 2019. Fallout: Leaking Data on Meltdown-Resistant CPUs. In Proc. of ACM CCS. London, United Kingdom.Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Claudio Canella, Michael Schwarz, Martin Haubenwallner, Martin Schwarzl, and Daniel Gruss. 2020. KASLR: Break it, Fix it, Repeat. In Proc. of ACM ASIA CCS. Taipei, Taiwan.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Mauro Conti, Stephen Crane, Tommaso Frassetto, Andrei Homescu, Georg Koppen, Per Larsen, Christopher Liebchen, Mike Perry, and Ahmad-Reza Sadeghi. 2016. Selfrando: Securing the Tor Browser against De-anonymization Exploits. Proceedings on Privacy Enhancing Technologies 2016, 4 (2016), 454--469.Google ScholarGoogle ScholarCross RefCross Ref
  30. Jonathan Corbet. 2011. Kernel address randomization. https://lwn.net/Articles/444503/.Google ScholarGoogle Scholar
  31. Lizzie Dixon. 2017. Breaking KASLR with perf. https://blog.lizzie.io/kaslr-and-perf.html.Google ScholarGoogle Scholar
  32. Dong Du, Tianyi Yu, Yubin Xia, Binyu Zang, Guanglu Yan, Chenggang Qin, Qixuan Wu, and Haibo Chen. 2020. Catalyzer: Sub-Millisecond Startup for Serverless Computing with Initialization-Less Booting (ASPLOS '20). 467--481.Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Jake Edge. 2013. Randomizing the kernel. https://lwn.net/Articles/546686/.Google ScholarGoogle Scholar
  34. Dmitry Evtyushkin, Dmitry Ponomarev, and Nael Abu-Ghazaleh. 2016. Jump over ASLR: Attacking branch predictors to bypass ASLR. In Proc of IEEE/ACM MICRO. Taipei, Taiwan.Google ScholarGoogle ScholarCross RefCross Ref
  35. David Gens, Orlando Arias, Dean Sullivan, Christopher Liebchen, Yier Jin, and Ahmad-Reza Sadeghi. 2017. LAZARUS: Practical Side-Channel Resilient Kernel-Space Randomization. In Proc. of RAID. Atlanta, GA.Google ScholarGoogle ScholarCross RefCross Ref
  36. Cristiano Giuffrida, Anton Kuijsten, and Andrew S. Tanenbaum. 2012. Enhanced Operating System Security Through Efficient and Finegrained Address Space Randomization. In Proc. of USENIX Security. Bellevue, WA.Google ScholarGoogle Scholar
  37. Daniel Gruss, Moritz Lipp, Michael Schwarz, Richard Fellner, Clémentine Maurice, and Stefan Mangard. 2017. KASLR is Dead: Long Live KASLR. In Proc. of ESSoS. Bonn, Germany.Google ScholarGoogle ScholarCross RefCross Ref
  38. Daniel Gruss, Clémentine Maurice, Andreas Fogh, Moritz Lipp, and Stefan Mangard. 2016. Prefetch Side-Channel Attacks: Bypassing SMAP and Kernel ASLR. In Proc. of ACM CCS. Vienna, Austria.Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Diwaker Gupta, Sangmin Lee, Michael Vrable, Stefan Savage, Alex C. Snoeren, George Varghese, Geoffrey M. Voelker, and Amin Vahdat. 2008. Difference Engine: Harnessing Memory Redundancy in Virtual Machines. In Proc. of USENIX OSDI. San Diego, CA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Baoquan He. 2015. randomize kernel physical address and virtual address separately. https://lwn.net/Articles/635901/.Google ScholarGoogle Scholar
  41. R. Hund, C. Willems, and T. Holz. 2013. Practical Timing Side Channel Attacks against Kernel Space ASLR. In Proc. of IEEE Security and Privacy. San Francisco, CA.Google ScholarGoogle Scholar
  42. Yeongjin Jang, Sangho Lee, and Taesoo Kim. 2016. Breaking Kernel Address Space Layout Randomization with Intel TSX. In Proc. of ACM CCS. Vienna, Austria.Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Chongkyung Kil, Jinsuk Jun, Christopher Bookholt, Jun Xu, and Peng Ning. 2006. Address Space Layout Permutation (ASLP): Towards Fine-Grained Randomization of Commodity Software. In Proc. of ACSAC. Miami Beach, FL.Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Yoongu Kim, Ross Daly, Jeremie Kim, Chris Fallin, Ji Hye Lee, Donghyuk Lee, Chris Wilkerson, Konrad Lai, and Onur Mutlu. 2014. Flipping bits in memory without accessing them: An experimental study of DRAM disturbance errors. ACM SIGARCH Computer Architecture News 42, 3 (2014), 361--372.Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Avi Kivity, Dor Laor, Glauber Costa, Pekka Enberg, Nadav Har'El, Don Marti, and Vlad Zolotarov. 2014. OSv: optimizing the operating system for virtual machines. In Proc. of USENIX Annual Technical Conf. Philadelphia, PA.Google ScholarGoogle Scholar
  46. Amit Klein and Benny Pinkas. 2019. From IP ID to Device ID and KASLR Bypass. In Proc. of USENIX Security. Santa Clara, CA.Google ScholarGoogle Scholar
  47. Hyungjoon Koo and Michalis Polychronakis. 2016. Juggling the Gadgets: Binary-Level Code Randomization Using Instruction Displacement. In Proc. of ACM ASIA CCS. Xi'an, China.Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Hsuan-Chi Kuo, Dan Williams, Ricardo Koller, and Sibin Mohan. 2020. A Linux in Unikernel Clothing. In Proc. of ACM EuroSys. Heraklion, Greece.Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Byoungyoung Lee, Long Lu, Tielei Wang, Taesoo Kim, and Wenke Lee. 2014. From Zygote to Morula: Fortifying Weakened ASLR on Android. In Proc. of IEEE Security and Privacy. San Jose, CA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Anil Madhavapeddy, Richard Mortier, Charalampos Rotsos, David Scott, Balraj Singh, Thomas Gazagnaire, Steven Smith, Steven Hand, and Jon Crowcroft. 2013. Unikernels: Library Operating Systems for the Cloud. In Proc. of ACM ASPLOS. Houston, TX.Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Filipe Manco, Costin Lupu, Florian Schmidt, Jose Mendes, Simon Kuenzer, Sumit Sati, Kenichi Yasukata, Costin Raiciu, and Felipe Huici. 2017. My VM is Lighter (and Safer) than your Container. In Proc. of ACM SOSP. Shanghai, China.Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Ming Mao and Marty Humphrey. 2012. A Performance Study on the VM Startup Time in the Cloud. In 2012 IEEE Fifth International Conference on Cloud Computing. 423--430. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. Joao Martins, Mohamed Ahmed, Costin Raiciu, Vladimir Olteanu, Michio Honda, Roberto Bifulco, and Felipe Huici. 2014. ClickOS and the Art of Network Function Virtualization. In Proc. of USENIX NSDI. Seattle, WA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. Edward Oakes, Leon Yang, Dennis Zhou, Kevin Houck, Tyler Harter, Andrea Arpaci-Dusseau, and Remzi Arpaci-Dusseau. 2018. SOCK: Rapid Task Provisioning with Serverless-Optimized Containers. In Proc. of USENIX Annual Technical Conf. Boston, MA.Google ScholarGoogle Scholar
  55. Pierre Olivier, Daniel Chiba, Stefan Lankes, Changwoo Min, and Binoy Ravindran. 2019. A Binary-compatible Unikernel. In Proc. of ACM VEE (Providence, RI).Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Vasilis Pappas, Michalis Polychronakis, and Angelos D. Keromytis. 2012. Smashing the Gadgets: Hindering Return-Oriented Programming Using In-Place Code Randomization. In Proc. of IEEE Security and Privacy. San Francisco, CA.Google ScholarGoogle Scholar
  57. Mathias Payer. 2012. Too much PIE is bad for performance. Technical Report 766. ETH Zurich, Zurich, Switzerland.Google ScholarGoogle Scholar
  58. Peter Pessl, Daniel Gruss, Clémentine Maurice, Michael Schwarz, and Stefan Mangard. 2016. DRAMA: Exploiting DRAM Addressing for Cross-CPU Attacks. In Proc. of USENIX Security. Austin, TX.Google ScholarGoogle Scholar
  59. Xiang (Jenny) Ren, Kirk Rodrigues, Luyuan Chen, Camilo Vega, Michael Stumm, and Ding Yuan. 2019. An Analysis of Performance Evolution of Linux's Core Operations. In Proc. of ACM SOSP. Huntsville, Ontario, Canada.Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. Dan Rosenberg. 2010. kptr_restrict for hiding kernel pointers. https://lwn.net/Articles/420403/.Google ScholarGoogle Scholar
  61. Hovav Shacham. 2007. The Geometry of Innocent Flesh on the Bone: Return-into-Libc without Function Calls (on the X86). In Proc. of ACM CCS. Alexandria, VA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. Klaus Stengel, Florian Schmaus, and Rüdiger Kapitza. 2013. EsseOS: Haskell-based Tailored Services for the Cloud. In Proceedings of the 12th International Workshop on Adaptive and Reflective Middleware (Beijing, China) (ARM '13). ACM, New York, NY, USA, Article 4, 6 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. The PaX team. 2013. KASLR: An Exercise in Cargo Cult Security. https://grsecurity.net/kaslr_an_exercise_in_cargo_cult_security.Google ScholarGoogle Scholar
  64. Arjan van de Ven. 2015. An introduction to Clear Containers. https://lwn.net/Articles/644675/.Google ScholarGoogle Scholar
  65. Fernando Vano-Garcia and Hector Marco-Gisbert. 2020. KASLR-MT: Kernel Address Space Layout Randomization for Multi-Tenant cloud systems. J. Parallel and Distrib. Comput. 137 (2020), 77 -- 90.Google ScholarGoogle ScholarDigital LibraryDigital Library
  66. F. Vañó-García and H. Marco-Gisbert. 2018. How Kernel Randomization is Canceling Memory Deduplication in Cloud Computing Systems. In Proc. of IEEE NCA". Cambridge, MA.Google ScholarGoogle Scholar
  67. Kai-Ting Amy Wang, Rayson Ho, and Peng Wu. 2019. Replayable Execution Optimized for Page Sharing for a Managed Runtime Environment. In Proc. of ACM EuroSys. Dresden, Germany.Google ScholarGoogle Scholar
  68. Richard Wartell, Vishwath Mohan, Kevin W. Hamlen, and Zhiqiang Lin. 2012. Binary Stirring: Self-Randomizing Instruction Addresses of Legacy X86 Binary Code. In Proc. of ACM CCS. Raleigh, North Carolina, USA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  69. Andrew Whitaker, Marianne Shaw, and Steven D. Gribble. 2002. Scale and Performance in the Denali Isolation Kernel. In Proc. of USENIX OSDI. Boston, MA.Google ScholarGoogle Scholar
  70. Dan Williams and Ricardo Koller. 2016. Unikernel Monitors: Extending Minimalism Outside of the Box. In Proc. of USENIX HotCloud. Denver, CO.Google ScholarGoogle ScholarDigital LibraryDigital Library
  71. Dan Williams, Ricardo Koller, Martin Lucina, and Nikhil Prakash. 2018. Unikernels As Processes. In Proc. of ACM SoCC. Carlsbad, CA.Google ScholarGoogle ScholarDigital LibraryDigital Library
  72. Yuval Yarom and Katrina Falkner. 2014. FLUSH+RELOAD: A High Resolution, Low Noise, L3 Cache Side-Channel Attack. In Proc. of USENIX Security. San Diego, CA.Google ScholarGoogle Scholar

Index Terms

  1. KASLR in the age of MicroVMs

    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
      EuroSys '22: Proceedings of the Seventeenth European Conference on Computer Systems
      March 2022
      783 pages
      ISBN:9781450391627
      DOI:10.1145/3492321

      Copyright © 2022 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: 28 March 2022

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate241of1,308submissions,18%
    • Article Metrics

      • Downloads (Last 12 months)126
      • Downloads (Last 6 weeks)9

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader