bf4: towards bug-free P4 programs
Dragos Dumitrescu, Radu Stoenescu, Lorina Negreanu, Costin Raiciu
Abstract
Recent verification work has made advances in finding bugs in P4 programs before deployment, but it requires that the programmer specifies table rules that are possible at runtime[32, 24, 27]. This imposes a specification burden on the programmer, while at the same time failing to guarantee that bugs will not be inserted at runtime by faulty controllers. We present bf4, a novel verification approach for P4 programs that uses a mix of static verification, code changes and runtime checks to ensure that the deployed P4 program is bug free. To achieve this, bf4 uses static analysis to find all possible bugs in the P4 program; for each possible bug, bf4 attempts to find predicates that, when applied to table rules inserted by the controller, make that bug unreachable. If such predicates do not exist, bf4 can change the P4 code and re-run the procedure above. We applied bf4 to a wide range of P4 programs; for all these, bf4 is able to generate controller assertions and propose fixes that guarantee no controller-induced bug is reachable. At runtime, bf4 checks that the controller does not insert faulty rules; when it does, it throws an exception which helps troubleshoot the bug.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get eb47f5f5-075f-4adb-bd39-3725e71d5511Cited by top-tier papers8
- Aquila: a practically usable verification system for production-scale programmable data planesBingchuan Tian, Jiaqi Gao, Mengqi Liu, Ennan Zhai et al.SIGCOMM 2021 · 28 citations
- Probabilistic profiling of stateful data planes for adversarial testingQiao Kang, Jiarong Xing, Yiming Qiu, Ang ChenASPLOS 2021 · 21 citations
- Dependently-typed data plane programmingMatthias Eichholz, Eric Hayden Campbell, Matthias Krebs, Nate Foster et al.POPL 2022 · 15 citations
- On Temporal Verification of Stateful P4 ProgramsDelong Zhang, Chong Ye, Fei HeNSDI 2025 · 6 citations
- Computing Precise Control Interface SpecificationsEric Hayden Campbell, Hossein Hojjat, Nate FosterOOPSLA 2024 · 1 citation
Related papers
- Fix with P6: Verifying Programmable Switches at RuntimeApoorv Shukla, Kevin Nico Hudemann, Zsolt Vági, Lily Hügerich et al.INFOCOM 2021 · 13 citations
- P4R-Type: A Verified API for P4 Control Plane ProgramsJens Kanstrup Larsen, Roberto Guanciale, Philipp Haller, Alceste ScalasOOPSLA 2023 · 1 citation
- P4Inv: Inferring Packet Invariants for Verification of Stateful P4 ProgramsDelong Zhang, Chong Ye, Fei HeINFOCOM 2024 · 3 citations
- eBPF Misbehavior Detection: Fuzzing with a Specification-Based OracleTao Lyu, Kumar Kartikeya Dwivedi, Thomas Bourgeat, Mathias Payer et al.SOSP 2025
- Towards Efficient Verification of Distributed In-Network Computing ProgramsMingyuan Song, Huan Shen, Jinghui Jiang, Qiang Su et al.SIGCOMM 2026
