Security-Hardening Software Libraries with Ada and SPARK -- A TCP Stack Use Case
Kyriakos Georgiou, Guillaume Cluzel, Paul Butcher, Yannick Moy

TL;DR
This paper demonstrates how replacing C code with formally verified SPARK Ada code and modeling dependencies improves the security and reliability of an embedded TCP/IP stack, detecting and fixing bugs.
Contribution
It introduces a multifaceted approach using SPARK and symbolic execution to enhance security and reliability of C-based TCP/IP stacks.
Findings
Detected and fixed two bugs in the TCP layer.
Significantly enhanced security and reliability of the TCP/IP stack.
Applicable approach for hardening critical C libraries.
Abstract
This white paper demonstrates how the assurance, reliability, and security of an existing professional-grade, open-source embedded TCP/IP stack implementation written in the C programming language is significantly enhanced by adopting the SPARK technology. A multifaceted approach achieves this. Firstly, the TCP layer's C code is being replaced with formally verified SPARK, a subset of the Ada programming language supported by formal verification tools. Then the lower layers, still written in C and on which the TCP layer depends, are modeled using SPARK contracts and validated using symbolic execution with KLEE. Finally, formal contracts for the upper layers are defined to call the TCP layer. The work allowed the detection and correction of two bugs in the TCP layer. In an increasingly connected world, where Cyber Security is of paramount importance, the powerful approach detailed in…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Security and Verification in Computing · Advanced Malware Detection Techniques
