formal sound verification of linux s usb bp keyboard
play

Formal sound verification of Linuxs USB BP keyboard driver Willem - PowerPoint PPT Presentation

Formal sound verification of Linuxs USB BP keyboard driver Willem Penninckx Jan Tobias Mhlberg Jan Smans Bart Jacobs Frank Piessens Table Of Contents What did we do? How did we do it? What did we learn? Table Of Contents


  1. Formal sound verification of Linux’s USB BP keyboard driver Willem Penninckx Jan Tobias Mühlberg Jan Smans Bart Jacobs Frank Piessens

  2. Table Of Contents ● What did we do? ● How did we do it? ● What did we learn?

  3. Table Of Contents ● What did we do? ● How did we do it? ● What did we learn?

  4. Formal sound verification Check properties: Bug hunting ● Never crashes ● No race-condition If “green bar”, then ● API rules verified property always holds ● Real-world software toy ● Unbounded number of threads ● Unbounded number of keyboards Linux’s USB BP keyboard driver

  5. Table Of Contents ● What did we do? ● How did we do it? ● What did we learn?

  6. usbkbd.c input.h /*@ /*@ Formal * preCond * PreCond * postCond API * PostCond @*/ specs @*/ void input_register(); void fun1() { c_code; usb.h //@ ghostcode c_code; /*@ usb_core.c c_code; * preCond } * postCond void @*/ usb_kill_urb() { void usb_kill_urb(); c_code; c_code; /*@ c_code; * (ghost code) } @*/

  7. usbkbd.c /*@ * PreCond * PostCond @*/ void fun1() { c_code; //@ ghostcode c_code; c_code; } Tool: VeriFast

  8. Table Of Contents ● What did we do? ● How did we do it? ● What did we learn?

  9. Learned / Conclusions Possible to combine: ● Soundness ● Unbounded #threads ● Real driver ● API usage rules File Lines C Lines annot Tool speed usbkbd.c 329 822 ~1 second API headers / 769 Bugs found ● Unloading bug ● Synchronization bug Patches are in Linux 3.3 http://people.cs.kuleuven.be/~willem.penninckx/usbkbd/

  10. Slide to workaround go-back-after-last-slide-and-miss-final-animation bug

Recommend


More recommend