Lune

USENIX Security2023Top-tier venue

Silent Bugs Matter: A Study of Compiler-Introduced Security Bugs

Jianhao Xu, Kangjie Lu, Zhengjie Du, Zhu Ding, Linke Li, Qiushi Wu, Mathias Payer, Bing Mao

Abstract

Compilers assure that any produced optimized code is semantically equivalent to the original code. However, even "correct" compilers may introduce security bugs as security properties go beyond translation correctness. Security bugs introduced by such correct compiler behaviors can be disputable; compiler developers expect users to strictly follow language specifications and understand all assumptions, while compiler users may incorrectly assume that their code is secure. Such bugs are hard to find and prevent, especially when it is unclear whether they should be fixed on the compiler or user side. Nevertheless, these bugs are real and can be severe, thus should be studied carefully. We perform a comprehensive study on compiler-introduced security bugs (CISB) and their root causes. We collect a large set of CISB in the wild by manually analyzing 4,827 potential bug reports of the most popular compilers (GCC and Clang), distilling them into a taxonomy of CISB. We further conduct a user study to understand how compiler users view compiler behaviors. Our study shows that compiler-introduced security bugs are common and may have serious security impacts. It is unrealistic to expect compiler users to understand and comply with compiler assumptions. For example, the "no-undefinedbehavior" assumption has become a nightmare for users and a major cause of CISB. Table 4: A three-layer taxonomy of compiler introduced security bugs. Root cause Insecure optimization behaviors Security consequences Eliminating security related code §4.1 Elimination of security checks Implicit Specification §4 Elimination of critical memory operations (No-UB, Default-behavior, Reordering order-sensitive security code §4.2 Disorder between order-sensitive memory operations and Environment) Disorder between security checks and dangerous operations Introducing insecure instructions §4.3

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

15 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Meltdown: Reading Kernel Memory from User Space cites Spectre Attacks: Exploiting Speculative Execution
  • Preservation of Speculative Constant-Time by Compilation cites Spectre Attacks: Exploiting Speculative Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers15

  1. WhiteFox: White-Box Compiler Fuzzing Empowered by Large Language ModelsChenyuan Yang, Yinlin Deng, Runyu Lu, Jiayi Yao et al.OOPSLA 2024 · 74 citations
  2. Improving Security Tasks Using Compiler Provenance Information Recovered At the Binary-LevelYufei Du, Omar Alrawi, Kevin Z. Snow, Manos Antonakakis et al.CCS 2023 · 8 citations
  3. Preservation of Speculative Constant-Time by CompilationSantiago Arranz-Olmos, Gilles Barthe, Lionel Blatter, Benjamin Grégoire et al.POPL 2025 · 8 citations
  4. CryptoBap: A Binary Analysis Platform for Cryptographic ProtocolsFaezeh Nasrabadi, Robert Künnemann, Hamed NematiCCS 2023 · 3 citations
  5. Understanding Compiler Bugs in Real DevelopmentHao ZhongICSE 2025 · 3 citations

Builds on27

  1. Spectre Attacks: Exploiting Speculative ExecutionPaul Kocher, Jann Horn, Anders Fogh, Daniel Genkin et al.S&P 2019 · 2,435 citations
  2. Meltdown: Reading Kernel Memory from User SpaceMoritz Lipp, Michael Schwarz, Daniel Gruss, Thomas Prescher et al.USENIX Security 2018 · 1,456 citations
  3. Angora: Efficient Fuzzing by Principled SearchPeng Chen, Hao ChenS&P 2018 · 616 citations
  4. CollAFL: Path Sensitive FuzzingShuitao Gan, Chao Zhang, Xiaojun Qin, Xuwen Tu et al.S&P 2018 · 426 citations
  5. T-Fuzz: Fuzzing by Program TransformationHui Peng, Yan Shoshitaishvili, Mathias PayerS&P 2018 · 326 citations

Related papers

  1. CLower: Detecting Compiler Pessimization Bugs through Redundant Memory AccessesJianhao Xu, Kunbo Zhang, Mathias Payer, Kangjie Lu et al.OOPSLA 2026
  2. SoK: Sanitizing for SecurityDokyung Song, Julian Lettner, Prabhu Rajasekaran, Yeoul Na et al.S&P 2019 · 196 citations
  3. Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints InferencesKangjie Lu, Aditya Pakki, Qiushi WuUSENIX Security 2019 · 97 citations
  4. Rust’s Type Checker Implementation Is Unsound: An Empirical Study on Soundness Bugs in rustcYusung Sim, Sukyoung Ryu, Jaemin HongISSTA 2026
  5. Evaluating the Effectiveness of Memory Safety SanitizersEmanuel Q. Vintila, Philipp Zieris, Julian HorschS&P 2025
Dusk over the sea between two cliffs drawn in fine vertical lines