- 著者
-
Wataru Hashimoto
Takahiro Shinagawa
- 雑誌
- 研究報告システムソフトウェアとオペレーティング・システム(OS) (ISSN:21888795)
- 巻号頁・発行日
- vol.2023-OS-160, no.9, pp.1-9, 2023-07-27
Low-level languages including C/C++ require manual heap management, which often leads to memory-related bugs. The key challenge of UAF prevention is to ensure that freed heap objects are not accessed through dangling pointers, while not introducing significant performance overhead, and preserving the source code compatibility. We present LeaseMalloc, a system that combines a source code transformation and a runtime library to detect UAF. It ”leases” heap objects to users, then ensures that memory is not accessed through dangling pointers by supervising the lease status of heap objects. Lease information is updated dynamically at runtime, which allows LeaseMalloc to skip the lease check to reduce the performance overhead. We implement LeaseMalloc as an LLVM Pass Plugin to instrument target application and confirmed that it can detect temporal memory errors without modifying application source code.