GIANTSAN: Efficient Memory Sanitization with Segment Folding
Hao Ling, Heqing Huang, Chengpeng Wang, Yuandao Cai, Charles Zhang
Abstract
Memory safety sanitizers, the sharp weapon for detecting invalid memory operations during execution, employ runtime metadata to model the memory and help find memory errors hidden in the programs. However, location-based methods, the most widely deployed memory sanitization methods thanks to their high compatibility, face the low protection density issue: the number of bytes safeguarded by one metadata is limited. As a result, numerous memory accesses require loading excessive metadata, leading to a high runtime overhead.
To address this issue, we propose a new shadow encoding with segment folding to increase the protection density. Specifically, we characterize neighboring bytes with identical metadata by building novel summaries, called folded segments, on those bytes to reduce unnecessary metadata loadings. The new encoding uses less metadata to safeguard large memory regions, speeding up memory sanitization.
We implement our designed technique as GiantSan. Our evaluation using the SPEC CPU 2017 benchmark shows that GiantSan outperforms the state-of-the-art methods with 59.10% and 38.52% less runtime overhead than ASan and ASan--, respectively. Moreover, under the same redzone setting, GiantSan detects 463 fewer false negative cases than ASan and ASan--in testing the real-world project PHP.
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 772ffa8c-141a-4465-a9a0-1b4207c0d89bCited by top-tier papers5
- OPTISAN: Using Multiple Spatial Error Defenses to Optimize Stack Memory Protection within a BudgetRahul George, Mingming Chen, Kaiming Huang, Zhiyun Qian et al.USENIX Security 2024 · 4 citations
- NanoTag: Systems Support for Efficient Byte-Granular Overflow Detection on ARM MTEMingkai Li, Hang Ye, Joseph Devietti, Suman Jana et al.S&P 2026 · 1 citation
- CombiSan: Unifying Software Sanitizers for Comprehensive FuzzingMatteo Marini, Floris Gorter, Daniele Cono D'Elia, Cristiano GiuffridaUSENIX Security 2026
- SeMalloc: Semantics-Informed Memory AllocatorRuizhe Wang, Meng Xu, N. AsokanCCS 2024
- RangeSanitizer: Detecting Memory Errors with Efficient Range ChecksFloris Gorter, Cristiano GiuffridaUSENIX Security 2025
Builds on10
- SoK: Sanitizing for SecurityDokyung Song, Julian Lettner, Prabhu Rajasekaran, Yeoul Na et al.S&P 2019 · 196 citations
- Stack Bounds Protection with Low Fat PointersGregory J. Duck, Roland H. C. Yap, Lorenzo CavallaroNDSS 2017 · 121 citations
- MCI : Modeling-based Causality Inference in Audit Logging for Attack InvestigationYonghwi Kwon, Fei Wang, Weihang Wang, Kyu Hyung Lee et al.NDSS 2018 · 116 citations
- Oscar: A Practical Page-Permissions-Based Scheme for Thwarting Dangling PointersThurston H. Y. Dang, Petros Maniatis, David A. WagnerUSENIX Security 2017 · 77 citations
- PTAuth: Temporal Memory Safety via Robust Points-to AuthenticationReza Mirzazade Farkhani, Mansour Ahmadi, Long LuUSENIX Security 2021 · 67 citations
Related papers
- Practical Object-Level Sanitizer with Aggregated Memory Access and Custom AllocatorXiaolei Wang, Ruilin Li, Bin Zhang, Chao Feng et al.ICSE 2025
- PACMem: Enforcing Spatial and Temporal Memory Safety via ARM Pointer AuthenticationYuan Li, Wende Tan, Zhizheng Lv, Songtao Yang et al.CCS 2022 · 30 citations
- Debloating Address SanitizerYuchen Zhang, Chengbin Pang, Georgios Portokalidis, Nikos Triandopoulos et al.USENIX Security 2022
- QuickSafe: Targeted Hardening Against Memory CorruptionJohannes Blaser, Floris Gorter, Klaus von Gleissenthall, Herbert BosS&P 2026
- Efficient Greybox Fuzzing to Detect Memory ErrorsJinsheng Ba, Gregory J. Duck, Abhik RoychoudhuryASE 2022 · 13 citations
