Trustworthy Systems

Verifying device drivers with Pancake

Authors

Junming Zhao, Alessandro Legnani, Tiana Tsang Ung, H. Truong, Tsun Wang Sau, Miki Tanaka, Johannes Åman Pohjola, Thomas Sewell, Rob Sison, Hira Syeda, Magnus Myreen, Michael Norrish and Gernot Heiser

    School of Computer Science and Engineering
    UNSW,
    Sydney 2052, Australia

Abstract

Device driver bugs are the leading cause of OS compromises, and their formal verification is therefore highly desirable. To the best of our knowledge, no realistic and performant driver has been verified for a non-trivial device. We propose Pancake, an imperative language for systems programming that features a well-defined and verification-friendly semantics. Leveraging the verified compiler backend of the CakeML functional language, we develop a compiler for Pancake that guarantees that the binary retains the semantics of the source code. Using automatic translation of Pancake to the Viper SMT front-end, we verify a performant driver for an Ethernet NIC.

BibTeX Entry

  @article{Zhao_LTUTSTASSSMNH_25,
    archiveprefix    = {arXiv},
    author           = {Junming Zhao and Alessandro Legnani and Tiana Tsang Ung and H. Truong and Tsun Wang Sau and Miki
                        Tanaka and Johannes {\AA}man Pohjola and Thomas Sewell and Rob Sison and Hira Syeda and Magnus
                        Myreen and Michael Norrish and Gernot Heiser},
    eprint           = {2501.08249},
    journal          = {arXiv preprint},
    month            = jan,
    numpages         = {15},
    paperurl         = {https://trustworthy.systems/publications/papers/Zhao_LTUTSTASSSMNH_25.pdf},
    primaryclass     = {cs.PL},
    title            = {Verifying Device Drivers with {Pancake}},
    url              = {https://arxiv.org/abs/2501.08249},
    year             = {2025}
  }

Download