Abstract

We present a Network Address Translator (NAT) written in C and proven to be semantically correct according to RFC 3022, as well as crash-free and memory-safe. There exists a lot of recent work on network verification, but it mostly assumes models of network functions and proves properties specific to network configuration, such as reachability and absence of loops. Our proof applies directly to the C code of a network function, and it demonstrates the absence of implementation bugs. Prior work argued that this is not feasible (i.e., that verifying a real, stateful network function written in C does not scale) but we demonstrate otherwise: NAT is one of the most popular network functions and maintains per-flow state that needs to be properly updated and expired, which is a typical source of verification challenges. We tackle the scalability challenge with a new combination of symbolic execution and proof checking using separation logic; this combination matches well the typical structure of a network function. We then demonstrate that formally proven correctness in this case does not come at the cost of performance. The NAT code, proof toolchain, and proofs are available at https://vignat.github.io/

Keywords:
Computer science Reachability Scalability Correctness Nat Symbolic execution Programming language Memory safety Stateful firewall Mathematical proof Toolchain Function (biology) Code (set theory) Network address translation Separation logic Theoretical computer science Compiler Software Operating system Computer network

Metrics

35
Cited By
4.13
FWCI (Field Weighted Citation Impact)
55
Refs
0.94
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Security and Verification in Computing
Physical Sciences →  Computer Science →  Artificial Intelligence
Software System Performance and Reliability
Physical Sciences →  Computer Science →  Computer Networks and Communications
Software-Defined Networks and 5G
Physical Sciences →  Computer Science →  Computer Networks and Communications

Related Documents

JOURNAL ARTICLE

Formally verified mathematics

Jeremy AvigadJohn Harrison

Journal:   Communications of the ACM Year: 2014 Vol: 57 (4)Pages: 66-75
JOURNAL ARTICLE

Formally verified redundancy removal

S. HendricxL. Claesen

Journal:   Design, Automation and Test in Europe Conference and Exhibition, 1999. Proceedings (Cat. No. PR00078) Year: 2003 Pages: 150-155
© 2026 ScienceGate Book Chapters — All rights reserved.