Bennet: Randomized Specification Testing for Heap-Manipulating Programs
摘要
Property-based testing (PBT), widely used in functional languages and interactive theorem provers, works by randomly generating many inputs to a system under test. While PBT has also seen some use in low-level languages like C, users in this setting must craft all their own generators by hand, rather than letting the tool synthesize most generators automatically from types or logical specifications. For low-level code with complex memory ownership patterns, writing such generators can waste significant amounts of time.
CN, a specification and verification framework for C, features a streamlined presentation of separation logic that is specially tuned to present only "easy" logical problems to an underlying constraint solver. Prior work on the Fulminate testing framework has shown that CN's streamlined specifications can also be checked effectively at run time, providing an oracle for testing whether a memory state satisfies a pre-or postcondition.
We show that the restricted syntax of CN is also a good basis for deriving generators for random inputs satisfying separation-logic preconditions. We formalize the semantics for a DSL describing these generators, as well as optimizations that reorder when values are generated and propagate arithmetic constraints. Using this DSL, we implement a property-based testing tool, Bennet, that generates and runs random tests for C functions annotated with CN specifications. We evaluate Bennet on a corpus of programs with CN specifications and show that it can efficiently generate bug-revealing inputs for heap-manipulating programs with complex preconditions.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- GRIMOIRE: Synthesizing Structure while Fuzzing 引用了 REDQUEEN: Fuzzing with Input-to-State Correspondence
- GRIMOIRE: Synthesizing Structure while Fuzzing 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- REDQUEEN: Fuzzing with Input-to-State Correspondence 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Boosting fuzzer efficiency: an information theoretic perspective 引用了 Evaluating Fuzz Testing
- Boosting fuzzer efficiency: an information theoretic perspective 引用了 Coverage-based Greybox Fuzzing as Markov Chain
- Evaluating Fuzz Testing 引用了 Coverage-based Greybox Fuzzing as Markov Chain
它引用的 Paper19
- Coverage-based Greybox Fuzzing as Markov ChainMarcel Böhme, Van-Thuan Pham, Abhik RoychoudhuryCCS 2016 · 1,026 次引用
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei 等CCS 2018 · 753 次引用
- REDQUEEN: Fuzzing with Input-to-State CorrespondenceCornelius Aschermann, Sergej Schumilo, Tim Blazytko, Robert Gawlik 等NDSS 2019 · 413 次引用
- GRIMOIRE: Synthesizing Structure while FuzzingTim Blazytko, Cornelius Aschermann, Moritz Schlögel, Ali Abbasi 等USENIX Security 2019 · 123 次引用
- Boosting fuzzer efficiency: an information theoretic perspectiveMarcel Böhme, Valentin J. M. Manès, Sang Kil ChaFSE 2020 · 115 次引用
相关 Paper
- Random Testing via Runtime Abstract InterpretationZain K Aamer, Benjamin C. PierceOOPSLA 2026 · 1 次引用
- Fulminate: Testing CN Separation-Logic Specifications in CRini Banerjee, Kayvan Memarian, Dhruv C. Makwana, Christopher Pulte 等POPL 2025 · 6 次引用
- The Search for Constrained Random GeneratorsHarrison Goldstein, Hila Peleg, Cassia Torczon, Daniel Sainati 等PLDI 2026 · 1 次引用
- Programming and execution models for parallel bounded exhaustive testingNader Al Awar, Kush Jain, Christopher J. Rossbach, Milos GligoricOOPSLA 2021 · 4 次引用
- Tuning Random Generators: Property-Based Testing as Probabilistic ProgrammingRyan Tjoa, Poorva Garg, Harrison Goldstein, Todd D. Millstein 等OOPSLA 2025 · 2 次引用
