Lune

Abstract

Programming languages such as C and C ++ support variadic functions, i.e., functions that accept a variable number of arguments (e.g., printf). While variadic functions are flexible, they are inherently not type-safe. In fact, the semantics and parameters of variadic functions are defined implicitly by their implementation. It is left to the programmer to ensure that the caller and callee follow this implicit specification, without the help of a static type checker. An adversary can take advantage of a mismatch between the argument types used by the caller of a variadic function and the types expected by the callee to violate the language semantics and to tamper with memory. Format string attacks are the most popular example of such a mismatch. Indirect function calls can be exploited by an adversary to divert execution through illegal paths. CFI restricts call targets according to the function prototype which, for variadic functions, does not include all the actual parameters. However, as shown by our case study, current CFI implementations are mainly limited to nonvariadic functions and fail to address this potential attack vector. Defending against such an attack requires a stateful dynamic check. We present HexVASAN, a compiler based sanitizer to effectively type-check and thus prevent any attack via variadic functions (when called directly or indirectly). The key idea is to record metadata at the call site and verify parameters and their types at the callee whenever they are used at runtime. Our evaluation shows that Hex-VASAN is (i) practically deployable as the measured overhead is negligible (0.45%) and (ii) effective as we show in several case studies.

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.

4 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

  • SoK: On the Fragility of Memory Error Exploit Mitigations cites SoK: Sanitizing for Security
  • SoK: On the Fragility of Memory Error Exploit Mitigations cites TypeSan: Practical Type Confusion Detection
  • Poking Holes in Information Hiding cites Undermining Information Hiding (and What to Do about It)
  • Undermining Information Hiding (and What to Do about It) cites Poking Holes in Information Hiding
  • SoK: Sanitizing for Security cites TypeSan: Practical Type Confusion Detection
  • TypeSan: Practical Type Confusion Detection cites Poking Holes in Information Hiding
  • TypeSan: Practical Type Confusion Detection cites Protecting C++ Dynamic Dispatch Through VTable Interleaving
  • TypeSan: Practical Type Confusion Detection cites Undermining Information Hiding (and What to Do about It)
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. CollAFL: Path Sensitive FuzzingShuitao Gan, Chao Zhang, Xiaojun Qin, Xuwen Tu et al.S&P 2018 · 426 citations
  2. SoK: Sanitizing for SecurityDokyung Song, Julian Lettner, Prabhu Rajasekaran, Yeoul Na et al.S&P 2019 · 196 citations
  3. Fat Pointers for Temporal Memory Safety of CJie Zhou, John Criswell, Michael HicksOOPSLA 2023 · 17 citations
  4. SoK: On the Fragility of Memory Error Exploit MitigationsAdriaan Jacobs, Mahmoud Ammar, Stijn VolckaertUSENIX Security 2026

Builds on5

  1. TypeSan: Practical Type Confusion DetectionIstván Haller, Yuseok Jeon, Hui Peng, Mathias Payer et al.CCS 2016 · 97 citations
  2. Poking Holes in Information HidingAngelos Oikonomopoulos, Elias Athanasopoulos, Herbert Bos, Cristiano GiuffridaUSENIX Security 2016 · 92 citations
  3. Undermining Information Hiding (and What to Do about It)Enes Göktas, Robert Gawlik, Benjamin Kollenda, Elias Athanasopoulos et al.USENIX Security 2016 · 82 citations
  4. UniSan: Proactive Kernel Memory Initialization to Eliminate Data LeakagesKangjie Lu, Chengyu Song, Taesoo Kim, Wenke LeeCCS 2016 · 81 citations
  5. Protecting C++ Dynamic Dispatch Through VTable InterleavingDimitar Bounov, Rami Gökhan Kici, Sorin LernerNDSS 2016 · 77 citations

Related papers

  1. 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
  2. Finding Cracks in Shields: On the Security of Control Flow Integrity MechanismsYuan Li, Mingzhe Wang, Chao Zhang, Xingman Chen et al.CCS 2020 · 32 citations
  3. Evaluating the Effectiveness of Memory Safety SanitizersEmanuel Q. Vintila, Philipp Zieris, Julian HorschS&P 2025
  4. When Function Signature Recovery Meets Compiler OptimizationYan Lin, Debin GaoS&P 2021 · 22 citations
  5. K-Miner: Uncovering Memory Corruption in LinuxDavid Gens, Simon Schmitt, Lucas Davi, Ahmad-Reza SadeghiNDSS 2018 · 58 citations
Dusk over the sea between two cliffs drawn in fine vertical lines