An Integer Overflow Endgame: Compiler and Architecture Support for Default-On Integer Overflow Mitigation

Zheng Zhang, Qi Ling, and Kian Kasad, Purdue University; Brendan Ryan Sweeney, UT Austin; Deepak Gupta, Meta Platforms Inc.; Tal Garfinkel, Google; Kazem Taram, Purdue University

Distinguished Paper Award Winner

Integer overflow checks are off-by-default in most production settings due to their high overheads. Consequently, many serious vulnerabilities remain unmitigated. We analyze the source of these overheads---in compilers including LLVM (UBSan, Rust), and in processors including x86-64, ARM64, and RISC-V---and show how to eliminate them.

Overheads in LLVM stem from how overflow semantics are expressed in LLVM IR. LLVM's current approach, based on intrinsics and branches, interferes with a variety of middle end optimizations. We develop an alternative approach that tracks overflow semantics with metadata, but otherwise leaves LLVM IR unchanged, eliminating this overhead. Overheads in hardware primarily result from current ISA designs, that require doubling the number of μops for checked vs. unchecked arithmetic, stressing the processor pipeline. We show how simple ISA extensions can alleviate this stress, enabling overflow-checked arithmetic to issue as a single μop.

We evaluate these extensions through compiler-based emulation on real hardware and simulation in gem5. Our work offers a path to significantly reducing the cost of overflow checks in existing compilers, and demonstrates that integer overflow mitigation can be cheap enough for default-on use in future hardware.

USENIX Security '26 Open Access Sponsored by
King Abdullah University of Science and Technology (KAUST)

Open Access Media

USENIX is committed to Open Access to the research presented at our events. Papers and proceedings are freely available to everyone once the event begins. Any video, audio, and/or slides that are posted after the event are also free and open to everyone. Support USENIX and our commitment to Open Access.

BibTeX
@inproceedings {320551,
author = {Zheng Zhang and Qi Ling and Kian Kasad and Brendan Ryan Sweeney and Deepak Gupta and Tal Garfinkel and Kazem Taram},
title = {An Integer Overflow Endgame: Compiler and Architecture Support for {Default-On} Integer Overflow Mitigation},
booktitle = {35th USENIX Security Symposium (USENIX Security 26)},
year = {2026},
isbn = {978-1-939133-58-8},
address = {Baltimore, MD},
pages = {553--572},
url = {https://www.usenix.org/conference/usenixsecurity26/presentation/zhang-zheng},
publisher = {USENIX Association},
month = aug
}

Presentation Video