Lune

OOPSLA2022Top-tier venue

BFF: foundational and automated verification of bitfield-manipulating programs

Fengmin Zhu, Michael Sammler, Rodolphe Lepigre, Derek Dreyer, Deepak Garg

Abstract

Low-level systems code often needs to interact with data, such as page table entries or network packet headers, in which multiple pieces of information are packaged together as bitfield components of a single machine integer and accessed via bitfield manipulations (e.g., shifts and masking). Most existing approaches to verifying such code employ SMT solvers, instantiated with theories for bit vector reasoning: these provide a powerful hammer, but also significantly increase the trusted computing base of the verification toolchain. In this work, we propose an alternative approach to the verification of bitfield-manipulating systems code, which we call BFF. Building on the RefinedC framework, BFF is not only highly automated (as SMT-based approaches are) but also foundational---i.e., it produces a machine-checked proof of program correctness against a formal semantics for C programs, fully mechanized in Coq. Unlike SMT-based approaches, we do not try to solve the general problem of arbitrary bit vector reasoning, but rather observe that real systems code typically accesses bitfields using simple, well-understood programming patterns: the layout of a bit vector is known up front, and its bitfields are accessed in predictable ways through a handful of bitwise operations involving bit masks. Correspondingly, we center our approach around the concept of a structured bit vector---i.e., a bit vector with a known bitfield layout---which we use to drive simple and predictable automation. We validate the BFF approach by verifying a range of bitfield-manipulating C functions drawn from real systems code, including page table manipulation code from the Linux kernel and the pKVM hypervisor.

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.

2 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

  • On the unusual effectiveness of type-aware operator mutations for testing SMT solvers cites Validating SMT solvers via semantic fusion
  • On the unusual effectiveness of type-aware operator mutations for testing SMT solvers cites Detecting critical bugs in SMT solvers using blackbox mutational fuzzing
  • Practical Verification of System-Software Components Written in Standard C cites Validating SMT solvers via semantic fusion
  • Practical Verification of System-Software Components Written in Standard C cites RefinedC: automating the foundational verification of C code with refined ownership types
  • Destabilizing Iris cites RefinedC: automating the foundational verification of C code with refined ownership types
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Destabilizing IrisSimon Spies, Niklas Mück, Haoyi Zeng, Michael Sammler et al.PLDI 2025 · 5 citations
  2. Practical Verification of System-Software Components Written in Standard CCan Cebeci, Yonghao Zou, Diyu Zhou, George Candea et al.SOSP 2024 · 2 citations

Builds on7

  1. RefinedC: automating the foundational verification of C code with refined ownership typesMichael Sammler, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian et al.PLDI 2021 · 83 citations
  2. Validating SMT solvers via semantic fusionDominik Winterer, Chengyu Zhang, Zhendong SuPLDI 2020 · 80 citations
  3. On the unusual effectiveness of type-aware operator mutations for testing SMT solversDominik Winterer, Chengyu Zhang, Zhendong SuOOPSLA 2020 · 55 citations
  4. Detecting critical bugs in SMT solvers using blackbox mutational fuzzingMuhammad Numair Mansur, Maria Christakis, Valentin Wüstholz, Fuyuan ZhangFSE 2020 · 51 citations
  5. Generative type-aware mutation for testing SMT solversJiwon Park, Dominik Winterer, Chengyu Zhang, Zhendong SuOOPSLA 2021 · 31 citations

Related papers

  1. Interactive Bitvector Reasoning using Verified Bit-BlastingHenrik Böving, Siddharth Bhat, Luisa Cicolini, Alex C. Keizer et al.OOPSLA 2025 · 3 citations
  2. Certified Decision Procedures for Width-Independent Bitvector PredicatesSiddharth Bhat, Léo Stefanesco, Chris Hughes, Tobias GrosserOOPSLA 2025 · 2 citations
  3. Automating Bitvector and Finite Field Equivalence Proofs in LeanElizaveta Pertseva, Valentin Robert, Clark W. Barrett, James ParkerCAV 2026
  4. CoqQFBV: A Scalable Certified SMT Quantifier-Free Bit-Vector SolverXiaomu Shi, Yu-Fu Fu, Jiaxiang Liu, Ming-Hsien Tsai et al.CAV 2021 · 10 citations
  5. Scalable Bit-Blasting with AbstractionsAina Niemetz, Mathias Preiner, Yoni ZoharCAV 2024 · 11 citations
Dusk over the sea between two cliffs drawn in fine vertical lines