CMASan: Custom Memory Allocator-aware Address Sanitizer
Junwha Hong, Wonil Jang, Mijung Kim, Lei Yu, Yonghwi Kwon, Yuseok Jeon
Abstract
Custom Memory Allocator (CMA) replaces the standard memory allocator for various purposes, such as improving memory efficiency or enhancing security. However, memory objects allocated by CMA are vulnerable to memory bugs similar to those allocated by the standard memory allocator. Unfortunately, existing memory bug detection approaches, including Address Sanitizer (ASan), do not work properly with these CMAs because existing approaches are mainly designed for the standard memory allocator. This paper presents CMASan, the first CMA-aware address sanitizer designed to effectively detect memory bugs on CMA objects that ASan misses without requiring expert knowledge, manual code modifications, or changing the unique internal logic of CMAs. According to our evaluation, CMASan successfully identifies 19 previously unknown CMA memory bugs undetected by ASan, including some undetected for 9 years. Compared to ASan, CMASan incurs only an additional 9.63% overhead.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 62cdddde-9b9d-45c3-b564-d461c14a68f5Builds on6
- SoK: Sanitizing for SecurityDokyung Song, Julian Lettner, Prabhu Rajasekaran, Yeoul Na et al.S&P 2019 · 196 citations
- Towards Efficient Heap Overflow DiscoveryXiangkun Jia, Chao Zhang, Purui Su, Yi Yang et al.USENIX Security 2017 · 36 citations
- HEAPSTER: Analyzing the Security of Dynamic Allocators for Monolithic Firmware ImagesFabio Gritti, Fabio Pagani, Ilya Grishchenko, Lukas Dresel et al.S&P 2022 · 31 citations
- Goshawk: Hunting Memory Corruptions via Structure-Aware and Object-Centric Memory Operation SynopsisYunlong Lyu, Yi Fang, Yiwei Zhang, Qibin Sun et al.S&P 2022 · 26 citations
- SafePM: a sanitizer for persistent memoryKartal Kaan Bozdogan, Dimitrios Stavrakakis, Shady Issa, Pramod BhatotiaEuroSys 2022 · 10 citations
Related papers
- Debloating Address SanitizerYuchen Zhang, Chengbin Pang, Georgios Portokalidis, Nikos Triandopoulos et al.USENIX Security 2022
- ERASan: Efficient Rust Address SanitizerJiun Min, Dongyeon Yu, Seongyun Jeong, Dokyung Song et al.S&P 2024 · 6 citations
- Practical Object-Level Sanitizer with Aggregated Memory Access and Custom AllocatorXiaolei Wang, Ruilin Li, Bin Zhang, Chao Feng et al.ICSE 2025
- CombiSan: Unifying Software Sanitizers for Comprehensive FuzzingMatteo Marini, Floris Gorter, Daniele Cono D'Elia, Cristiano GiuffridaUSENIX Security 2026
- Evaluating the Effectiveness of Memory Safety SanitizersEmanuel Q. Vintila, Philipp Zieris, Julian HorschS&P 2025
