skip to main content
10.1145/3352460.3358299acmconferencesArticle/Chapter ViewAbstractPublication PagesmicroConference Proceedingsconference-collections
research-article
Public Access

Practical Byte-Granular Memory Blacklisting using Califorms

Published: 12 October 2019 Publication History

Abstract

Recent rapid strides in memory safety tools and hardware have improved software quality and security. While coarse-grained memory safety has improved, achieving memory safety at the granularity of individual objects remains a challenge due to high performance overheads usually between ~1.7x--2.2x. In this paper, we present a novel idea called Califorms, and associated program observations, to obtain a low overhead security solution for practical, byte-granular memory safety.
The idea we build on is called memory blacklisting, which prohibits a program from accessing certain memory regions based on program semantics. State of the art hardware-supported memory blacklisting, while much faster than software blacklisting, creates memory fragmentation (on the order of few bytes) for each use of the blacklisted location. We observe that metadata used for blacklisting can be stored in dead spaces in a program's data memory and that this metadata can be integrated into the microarchitecture by changing the cache line format. Using these observations, a Califorms based system proposed in this paper reduces the performance overheads of memory safety to ~1.02x--1.16x while providing byte-granular protection and maintaining very low hardware overheads. Moreover, the fundamental idea of storing metadata in empty spaces and changing cache line formats can be used for other security and performance applications.

References

[1]
2014. CVE--2014--1444. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1444. [Online; accessed 30-Aug-2019].
[2]
2017. CVE--2017--5115. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5115. [Online; accessed 30-Aug-2019].
[3]
ARM. 2018. ARM A64 instruction set architecture for ARMv8-A architecture profile. https://static.docs.arm.com/ddi0596/a/DDI_0596_ARM_a64_instruction_set_architecture.pdf.
[4]
Andrea Bittau, Adam Belay, Ali Mashtizadeh, David Mazi e res, and Dan Boneh. 2014. Hacking blind. In IEEE S&P '14: Proceedings of the 35th IEEE Symposium on Security and Privacy.
[5]
Kees Cook. 2017. Introduce struct layout randomization plugin. https://lkml.org/lkml/2017/5/26/558.
[6]
Crispin Cowan, Calton Pu, Dave Maier, Heather Hintony, Jonathan Walpole, Peat Bakke, Steve Beattie, Aaron Grier, Perry Wagle, and Qian Zhang. 1998. StackGuard: automatic adaptive detection and prevention of buffer-overflow attacks. In USENIX Security '98: Proceedings of the 7th USENIX Security Symposium.
[7]
Brooks Davis, Khilan Gudka, Alexandre Joannou, Ben Laurie, A Theodore Markettos, J Edward Maste, Alfredo Mazzinghi, Edward Tomasz Napierala, Robert M Norton, Michael Roe, Peter Sewell, Robert N M Watson, Stacey Son, Jonathan Woodruff, Alexander Richardson, Peter G Neumann, Simon W Moore, John Baldwin, David Chisnall, James Clarke, and Nathaniel Wesley Filardo. 2019. CheriABI: enforcing valid pointer provenance and minimizing pointer privilege in the POSIX C run-time environment. In ASPLOS '19: Proceedings of the 24th International Conference on Architectural Support for Programming Languages and Operating Systems.
[8]
Joe Devietti, Colin Blundell, Milo M K Martin, and Steve Zdancewic. 2008. HardBound: architectural support for spatial safety of the C programming language. In ASPLOS XIII: Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems.
[9]
Udit Dhawan, Catalin Hritcu, Raphael Rubin, Nikos Vasilakis, Silviu Chiricescu, Jonathan M Smith, Thomas F Knight, Jr, Benjamin C Pierce, and Andre DeHon. 2015. Architectural support for software-defined metadata processing. In ASPLOS '15: Proceedings of the 20th International Conference on Architectural Support for Programming Languages and Operating Systems.
[10]
Gregory J Duck and Roland H C Yap. 2018. EffectiveSan: type and memory error detection using dynamically typed C/C++. In PLDI '18: Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation.
[11]
Lieven Eeckhout. 2010. Computer architecture performance evaluation methods (1st ed.).
[12]
Nur Hussein. 2017. Randomizing structure layout. https://lwn.net/Articles/722293/.
[13]
Yuseok Jeon, Priyam Biswas, Scott Carr, Byoungyoung Lee, and Mathias Payer. 2017. HexType: efficient detection of type confusion errors for C++. In CCS '17: Proceedings of the 24th ACM SIGSAC Conference on Computer and Communications Security.
[14]
Lizy Kurian John. 2004. More on finding a single number to indicate overall performance of a benchmark suite. ACM SIGARCH Computer Architecture News 32, 1 (March 2004), 3--8.
[15]
Paul Kocher, 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 IEEE S&P '19: Proceedings of the 40th IEEE Symposium on Security and Privacy.
[16]
Kangjie Lu, Chengyu Song, Taesoo Kim, and Wenke Lee. 2016. UniSan: proactive kernel memory initialization to eliminate data leakages. In CCS '16: Proceedings of the 23rd ACM SIGSAC Conference on Computer and Communications Security.
[17]
Alyssa Milburn, Herbert Bos, and Cristiano Giuffrida. 2017. SafeInit: comprehensive and practical mitigation of uninitialized read vulnerabilities. In NDSS '17: Proceedings of the 2017 Network and Distributed System Security Symposium.
[18]
Santosh Nagarakatte, Milo M K Martin, and Steve Zdancewic. 2012. Watchdog: hardware for safe and secure manual memory management and full memory safety. In ISCA '12: Proceedings of the 39th International Symposium on Computer Architecture.
[19]
Santosh Nagarakatte, Milo M K Martin, and Steve Zdancewic. 2014. Watch-dogLite: hardware-accelerated compiler-based pointer checking. In CGO '14: Proceedings of the 12th IEEE/ACM International Symposium on Code Generation and Optimization.
[20]
Oleksii Oleksenko, Dmitrii Kuvaiskii, Pramod Bhatotia, Pascal Felber, and Christof Fetzer. 2018. Intel MPX explained: a cross-layer analysis of the Intel MPX system stack. Proceedings of the ACM on Measurement and Analysis of Computing Systems 2, 2 (June 2018), 28:1--28:30.
[21]
Oracle. 2015. Hardware-assisted checking using Silicon Secured Memory (SSM). https://docs.oracle.com/cd/E37069_01/html/E37085/gphwb.html.
[22]
Harish Patil, Robert Cohn, Mark Charney, Rajiv Kapoor, Andrew Sun, and Anand Karunanidhi. 2004. Pinpointing representative portions of large Intel® Itanium® programs with dynamic instrumentation. MICRO-37: Proceedings of the 37th IEEE/ACM International Symposium on Microarchitecture.
[23]
Feng Qin, Shan Lu, and Yuanyuan Zhou. 2005. SafeMem: exploiting ECC-memory for detecting memory leaks and memory corruption during production runs. In HPCA '05: Proceedings of the IEEE 11th International Symposium on High Performance Computer Architecture.
[24]
Daniel Sanchez and Christos Kozyrakis. 2013. ZSim: fast and accurate microarchitectural simulation of thousand-core systems. In ISCA '13: Proceedings of the 40th International Symposium on Computer Architecture.
[25]
Konstantin Serebryany, Derek Bruening, Alexander Potapenko, and Dmitry Vyukov. 2012. AddressSanitizer: a fast address sanity checker. In USENIX ATC '12: Proceedings of the 2012 USENIX Annual Technical Conference.
[26]
Kostya Serebryany, Evgenii Stepanov, Aleksey Shlyapnikov, Vlad Tsyrklevich, and Dmitry Vyukov. 2018. Memory tagging and how it improves C/C++ memory safety. arXiv.org (Feb. 2018). arXiv:cs.CR/1802.09517v1
[27]
Junjing Shi, Qin Long, Liming Gao, Michael A. Rothman, and Vincent J. Zimmer. 2018. Methods and apparatus to protect memory from buffer overflow and/or underflow. International patent WO/2018/176339.
[28]
Kanad Sinha and Simha Sethumadhavan. 2018. Practical memory safety with REST. In ISCA '18: Proceedings of the 45th International Symposium on Computer Architecture.
[29]
Dokyung Song, Julian Lettner, Prabhu Rajasekaran, Yeoul Na, Stijn Volckaert, Per Larsen, and Michael Franz. 2019. SoK: sanitizing for security. In IEEE S&P '19: Proceedings of the 40th IEEE Symposium on Security and Privacy.
[30]
David Weston and Matt Miller. 2016. Windows 10 mitigation improvements. Black Hat USA.
[31]
Jonathan Woodruff, Alexandre Joannou, Hongyan Xia, Anthony Fox, Robert Norton, David Chisnall, Brooks Davis, Khilan Gudka, Nathaniel W Filardo, A Theodore Markettos, Michael Roe, Peter G Neumann, Robert Nicholas Maxwell Watson, and Simon Moore. 2019. CHERI concentrate: practical compressed capabilities. IEEE Trans. Comput. 68, 10 (Oct. 2019), 1455--1469.
[32]
Jonathan Woodruff, Robert N M Watson, David Chisnall, Simon W Moore, Jonathan Anderson, Brooks Davis, Ben Laurie, Peter G Neumann, Robert Norton, and Michael Roe. 2014. The CHERI capability model: revisiting RISC in an age of risk. In ISCA '14: Proceedings of the 41st International Symposium on Computer Architecture.
[33]
Tong Zhang, Dongyoon Lee, and Changhee Jung. 2019. BOGO: buy spatial memory safety, get temporal memory safety (almost) free. In ASPLOS '19: Proceedings of the 24th International Conference on Architectural Support for Programming Languages and Operating Systems.

Cited By

View all

Index Terms

  1. Practical Byte-Granular Memory Blacklisting using Califorms

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      MICRO '52: Proceedings of the 52nd Annual IEEE/ACM International Symposium on Microarchitecture
      October 2019
      1104 pages
      ISBN:9781450369381
      DOI:10.1145/3352460
      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 ACM 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]

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 12 October 2019

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. caches
      2. memory blacklisting
      3. memory safety

      Qualifiers

      • Research-article
      • Research
      • Refereed limited

      Funding Sources

      • DARPA
      • ONR

      Conference

      MICRO '52
      Sponsor:

      Acceptance Rates

      Overall Acceptance Rate 484 of 2,242 submissions, 22%

      Upcoming Conference

      MICRO '24

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)168
      • Downloads (Last 6 weeks)28
      Reflects downloads up to 14 Sep 2024

      Other Metrics

      Citations

      Cited By

      View all

      View Options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Get Access

      Login options

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media