Towards Runtime Verification of Programmable Switches

04/22/2020
by   Apoorv Shukla, et al.
0

Is it possible to patch software bugs in P4 programs without human involvement? We show that this is partially possible in many cases due to advances in software testing and the structure of P4 programs. Our insight is that runtime verification can detect bugs, even those that are not detected at compile-time, with machine learning-guided fuzzing. This enables a more automated and real-time localization of bugs in P4 programs using software testing techniques like Tarantula. Once the bug in a P4 program is localized, the faulty code can be patched due to the programmable nature of P4. In addition, platform-dependent bugs can be detected. From P4_14 to P4_16 (latest version), our observation is that as the programmable blocks increase, the patchability of P4 programs increases accordingly. To this end, we design, develop, and evaluate P6 that (a) detects, (b) localizes, and (c) patches bugs in P4 programs with minimal human interaction. P6 tests P4 switch non-intrusively, i.e., requires no modification to the P4 program for detecting and localizing bugs. We used a P6 prototype to detect and patch seven existing bugs in eight publicly available P4 application programs deployed on two different switch platforms: behavioral model (bmv2) and Tofino. Our evaluation shows that P6 significantly outperforms bug detection baselines while generating fewer packets and patches bugs in P4 programs such as switch.p4 without triggering any regressions.

READ FULL TEXT

page 4

page 5

research
02/27/2021

Extracting Concise Bug-Fixing Patches from Human-Written Patches in Version Control Systems

High-quality and large-scale repositories of real bugs and their concise...
research
07/26/2022

FP4: Line-rate Greybox Fuzz Testing for P4 Switches

Compared to fixed-function switches, the flexibility of programmable swi...
research
06/01/2020

Gauntlet: Finding Bugs in Compilers for Programmable Packet Processing

Programmable packet-processing devices such as programmable switches and...
research
09/20/2019

Automated Verification of Integer Overflow

Integer overflow accounts for one of the major source of bugs in softwar...
research
06/07/2017

Counterexample-Guided k-Induction Verification for Fast Bug Detection

Recently, the k-induction algorithm has proven to be a successful approa...
research
02/25/2020

Binary-level Directed Fuzzing for Use-After-Free Vulnerabilities

Directed fuzzing focuses on automatically testing specific parts of the ...
research
04/16/2021

Generating Bug-Fixes Using Pretrained Transformers

Detecting and fixing bugs are two of the most important yet frustrating ...

Please sign up or login with your details

Forgot password? Click here to reset