CrossFit: Demystifying VM Callback Bugs in Interpreters
Chibin Zhang, Qiang Liu, Mathias Payer
摘要
Scripting languages like Python, Ruby, or PHP are integral to modern software development. Despite security measures like memory safety and sandboxing, vulnerabilities within these engines can lead to critical issues such as remote code execution or sandbox escapes. A particularly pervasive class of vulnerabilities is callback bugs, which occur when user-defined callbacks violate runtime invariants, such as freeing an object still in use (can be reached through live pointers) or modifying a data structure during traversal. These violations can result in severe consequences, including use-after-free, null-pointer dereferences, and type confusion, often leading to crashes, memory corruption, or even exploitable vulnerabilities. Detecting callback bugs remains challenging due to a lack of general understanding, as they have not been formally characterized or systematically studied. As such, existing tools lack the ability to ( 1) establish clear links between script-side callbacks and their native-side invokers, and (2) generate scripts that systematically satisfy preconditions required to trigger these bugs.
We propose CrossFit, a novel 2-tier approach combining static analysis and targeted fuzzing to systematically discover callback bugs. CrossFit first establishes links between script-side callbacks and their native-side invokers through context link analysis, enabling targeted exploration of high-risk code paths. It then generates proof-of-concept scripts with custom classes and magic methods, introducing side-effect operations to violate runtime invariants. Our evaluation shows that CrossFit effectively outperforms existing tools by up to 12.04% in terms of callsite coverage (i.e., potential sites where callback bugs may occur). We also identified 20 new bugs in Python, Ruby, and PHP, many of which are severe memory corruptions. Moreover, we provide a comprehensive benchmark totaling 150 proof-of-concepts to improve interpreter security.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- NAUTILUS: Fishing for Deep Bugs with Grammars 引用了 Skyfire: Data-Driven Seed Generation for Fuzzing
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 NAUTILUS: Fishing for Deep Bugs with Grammars
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 Skyfire: Data-Driven Seed Generation for Fuzzing
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript Engines
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic Validation 引用了 Fuzzing JavaScript Engines with Aspect-preserving Mutation
- CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript Engines 引用了 Skyfire: Data-Driven Seed Generation for Fuzzing
- Fuzzing JavaScript Engines with Aspect-preserving Mutation 引用了 NAUTILUS: Fishing for Deep Bugs with Grammars
- Fuzzing JavaScript Engines with Aspect-preserving Mutation 引用了 Skyfire: Data-Driven Seed Generation for Fuzzing
- Fuzzing JavaScript Engines with Aspect-preserving Mutation 引用了 CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript Engines
它引用的 Paper15
- Skyfire: Data-Driven Seed Generation for FuzzingJunjie Wang, Bihuan Chen, Lei Wei, Yang LiuS&P 2017 · 382 次引用
- NAUTILUS: Fishing for Deep Bugs with GrammarsCornelius Aschermann, Tommaso Frassetto, Thorsten Holz, Patrick Jauernig 等NDSS 2019 · 291 次引用
- CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript EnginesHyungSeok Han, DongHyeon Oh, Sang Kil ChaNDSS 2019 · 178 次引用
- Fuzzing JavaScript Engines with Aspect-preserving MutationSoyeon Park, Wen Xu, Insu Yun, Daehee Jang 等S&P 2020 · 126 次引用
- One Engine to Fuzz 'em All: Generic Language Processor Testing with Semantic ValidationYongheng Chen, Rui Zhong, Hong Hu, Hangfan Zhang 等S&P 2021 · 70 次引用
相关 Paper
- PyRTFuzz: Detecting Bugs in Python Runtimes via Two-Level Collaborative FuzzingWen Li, Haoran Yang, Xiapu Luo, Long Cheng 等CCS 2023 · 14 次引用
- JIT-Picking: Differential Fuzzing of JavaScript EnginesLukas Bernhard, Tobias Scharnowski, Moritz Schloegel, Tim Blazytko 等CCS 2022 · 42 次引用
- PyXray: Practical Cross-Language Call Graph Construction through Object Layout AnalysisGeorgios Alexopoulos, Thodoris Sotiropoulos, Georgios Gousios, Zhendong Su 等ICSE 2026
- XSSky: Detecting XSS Vulnerabilities through Local Path-Persistent FuzzingYoukun Shi, Yuan Zhang, Tianhao Bai, Feng Xue 等USENIX Security 2025
- Evaluating the Effectiveness of Memory Safety SanitizersEmanuel Q. Vintila, Philipp Zieris, Julian HorschS&P 2025
