Rely-guarantee Reasoning about Concurrent Memory Management: Correctness, Safety and Security

09/17/2023
by   Yongwang Zhao, et al.
0

Formal verification of concurrent operating systems (OSs) is challenging, in particular the verification of the dynamic memory management due to its complex data structures and allocation algorithm. An incorrect specification and implementation of the memory management may lead to system crashes or exploitable attacks. This article presents the first formal specification and mechanized proof of a concurrent memory management for a real-world OS concerning a comprehensive set of properties, including functional correctness, safety and security. To achieve the highest assurance evaluation level, we develop a fine-grained formal specification of the Zephyr RTOS buddy memory management, which closely follows the C code easing validation of the specification and the source code. The rely-guarantee-based compositional verification technique has been enforced over the formal model. To support formal verification of the security property, we extend our rely-guarantee framework PiCore by a compositional reasoning approach for integrity. Whilst the security verification of the design shows that it preserves the integrity property, the verification of the functional properties shows several problems. These verification issues are translated into finding three bugs in the C implementation of Zephyr, after inspecting the source code corresponding to the design lines breaking the properties.

READ FULL TEXT
research
09/17/2023

Rely-guarantee Reasoning about Concurrent Reactive Systems: The PiCore Framework, Languages Integration and Applications

The rely-guarantee approach is a promising way for compositional verific...
research
07/31/2023

Towards Formal Verification of a TPM Software Stack

The Trusted Platform Module (TPM) is a cryptoprocessor designed to prote...
research
10/10/2016

Verification of the Tree-Based Hierarchical Read-Copy Update in the Linux Kernel

Read-Copy Update (RCU) is a scalable, high-performance Linux-kernel sync...
research
09/03/2018

Deductive Verification of Unmodified Linux Kernel Library Functions

This paper presents results from the development and evaluation of a ded...
research
04/04/2021

A Logical Programming Language as an Instrument for Specifying and Verifying Dynamic Memory

This work proposes a Prolog-dialect for the found and prioritised proble...
research
05/20/2023

Formal Verification of Chase-Lev Deque in Concurrent Separation Logic

Chase-Lev deque is a concurrent data structure designed for efficient lo...
research
10/18/2018

An Event-based Compositional Reasoning Approach for Concurrent Reactive Systems

Reactive systems are composed of a well defined set of input events that...

Please sign up or login with your details

Forgot password? Click here to reset