RecordFlux: Formal Message Specification and Generation of Verifiable Binary Parsers

10/02/2019
by   Tobias Reiher, et al.
0

Various vulnerabilities have been found in message parsers of protocol implementations in the past. Even highly sensitive software components like TLS libraries are affected regularly. Resulting issues range from denial-of-service attacks to the extraction of sensitive information. The complexity of protocols and imprecise specifications in natural language are the core reasons for subtle bugs in implementations, which are hard to find. The lack of precise specifications impedes formal verification. In this paper, we propose a model and a corresponding domain-specific language to formally specify message formats of existing real-world binary protocols. A unique feature of the model is the capability to define invariants, which specify relations and dependencies between message fields. Furthermore, the model allows defining the relation of messages between different protocol layers and thus ensures correct interpretation of payload data. We present a technique to derive verifiable parsers based on the model, generate efficient code for their implementation, and automatically prove the absence of runtime errors. Examples of parser specifications for Ethernet and TLS demonstrate the applicability of our approach.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/13/2020

Multiparty Session Programming with Global Protocol Combinators

Multiparty Session Types (MPST) is a typing discipline for communication...
research
10/09/2020

Semi-Automated Protocol Disambiguation and Code Generation

For decades, Internet protocols have been specified using natural langua...
research
07/05/2021

Berserker: ASN.1-based Fuzzing of Radio Resource Control Protocol for 4G and 5G

Telecom networks together with mobile phones must be rigorously tested f...
research
04/11/2018

Modeling and Testing Implementations of Protocols with Complex Messages

This paper presents a new language called APSL for formally describing p...
research
02/06/2023

Leveraging TLA+ Specifications to Improve the Reliability of the ZooKeeper Coordination Service

ZooKeeper is a coordination service, widely used as a backbone of variou...
research
07/25/2018

Specification-Based Protocol Obfuscation

This paper proposes a new obfuscation technique of a communication proto...
research
03/27/2018

Comparative Study of Eight Formal Specifications of the Message Authenticator Algorithm

The Message Authenticator Algorithm (MAA) is one of the first cryptograp...

Please sign up or login with your details

Forgot password? Click here to reset