HeapCheck: Low-cost Hardware Support for Memory Safety

Author:

Saileshwar Gururaj1ORCID,Boivie Rick2,Chen Tong2,Segal Benjamin2,Buyuktosunoglu Alper2

Affiliation:

1. Georgia Tech, Georgia, USA

2. IBM Research, New York, USA

Abstract

Programs written in C/C++ are vulnerable to memory-safety errors like buffer-overflows and use-after-free. While several mechanisms to detect such errors have been previously proposed, they suffer from a variety of drawbacks, including poor performance, imprecise or probabilistic detection of errors, or requiring invasive changes to the ISA, binary-layout, or source-code that results in compatibility issues. As a result, memory-safety errors continue to be hard to detect and a principal cause of security problems. In this work, we present a minimally invasive and low-cost hardware-based memory-safety checking framework for detecting out-of-bounds accesses and use-after-free errors. The key idea of our mechanism is to re-purpose some of the “unused bits” in a pointer in 64-bit architectures to store an index into a bounds information table that can be used to catch out-bounds errors and use-after-free errors without any change to the binary layout. Using this memory-safety checking framework, we enable HeapCheck, a design for detecting Out-of-bounds and Use-after-free accesses for heap-objects, that are responsible for the majority of memory-safety errors in the wild. Our evaluations using C/C++ SPEC CPU 2017 workloads on Gem5 show that our solution incurs 1.5% slowdown on average, using an 8 KB on-chip SRAM cache for caching bounds-information. Our mechanism allows detection of out-of-bounds errors in user-code as well as in unmodified shared-library functions. Our mechanism has detected out-of-bounds accesses in 87 lines of code in the SPEC CPU 2017 benchmarks, primarily in Glibc v2.27 functions, that, to our knowledge, have not been previously detected even with popular tools like Address Sanitizer.

Publisher

Association for Computing Machinery (ACM)

Subject

Hardware and Architecture,Information Systems,Software

Reference52 articles.

1. Buffer Overflow (BOF) Examples—Heartbleed;NIST.;https://samate.nist.gov/BF/Examples/BOF.html,2014

2. 2019 CWE Top 25 Most Dangerous Software Errors;CWE.;https://cwe.mitre.org/top25/archive/2019/2019_cwe_top25.html,2019

3. Periklis Akritidis, Manuel Costa, Miguel Castro, and Steven Hand. 2009. Baggy bounds checking: An efficient and backwards-compatible defense against out-of-bounds errors. In Proceedings of the 18th USENIX Security Symposium, Fabian Monrose (Ed.). USENIX Association, 51–66. Retrieved from http://www.usenix.org/events/sec09/tech/full_papers/akritidis.pdf.

4. Armv8.5-A Memory Tagging Extension;https://developer.arm.com/-/media/Arm%20Developer%20Community/PDF/Arm_Memory_Tagging_Extension_Whitepaper.pdf,2019

5. Calling free() on a NULL pointer;Bigham Jeffrey P.;http://www.manticmoo.com/articles/jeff/programming/c/free-with-null-pointer.php,2006

Cited by 7 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Memory Tagging using Cryptographic Integrity on Commodity x86 CPUs;2024 IEEE 9th European Symposium on Security and Privacy (EuroS&P);2024-07-08

2. Cryptographically Enforced Memory Safety;Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security;2023-11-15

3. MIFP: Selective Fat-Pointer Bounds Compression for Accurate Bounds Checking;Proceedings of the 26th International Symposium on Research in Attacks, Intrusions and Defenses;2023-10-16

4. Multi-Tag: A Hardware-Software Co-Design for Memory Safety based on Multi-Granular Memory Tagging;Proceedings of the ACM Asia Conference on Computer and Communications Security;2023-07-10

5. FlexPointer: Fast Address Translation Based on Range TLB and Tagged Pointers;ACM Transactions on Architecture and Code Optimization;2023-03

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3