[Paper Review] BesFS: Mechanized Proof of an Iago-Safe Filesystem for Enclaves.
BesFS is a formally verified, Iago-safe filesystem API for Intel SGX enclaves, proven via 3,676 lines of Coq scripts to prevent OS-level tampering through system call manipulation. It enables secure, expressive file operations in trusted applications with minimal TCB overhead (under 750 LOC), eliminating known bugs and serving as a test oracle for Iago-safety.
New trusted computing primitives such as Intel SGX have shown the feasibility of running user-level applications in enclaves on a commodity trusted processor without trusting a large OS. However, the OS can compromise the integrity of the applications via the system call interface by tampering the return values. This class of attacks (commonly referred to as Iago attacks) have been shown to be powerful enough to execute arbitrary logic in enclave programs. To this end, we present BesFS -- a formal and provably Iago-safe API specification for the filesystem subset of the POSIX interface. We prove 118 lemmas and 2 key theorems in 3676 lines of CoQ proof scripts, which directly proves safety properties of BesFS implementation. BesFS API is expressive enough to support 17 real applications we test, and this principled approach eliminates several bugs. BesFS integrates into existing SGX-enabled applications with minimal impact to TCB (less than 750 LOC), and it can serve as concrete test oracle for other hand-coded Iago-safety checks.
Motivation & Objective
- To address the threat of Iago attacks that compromise enclave integrity via manipulated system call returns in SGX environments.
- To design a provably Iago-safe filesystem API that maintains expressiveness for real-world applications.
- To minimize the trusted code base (TCB) while ensuring formal verification of security properties.
- To provide a concrete test oracle for validating other Iago-safety mechanisms in SGX applications.
Proposed method
- Formal specification of a filesystem subset of the POSIX interface using Coq, ensuring Iago safety by construction.
- Mechanized proof of 118 lemmas and 2 key theorems over 3,676 lines of Coq code to verify safety properties.
- Design of an API that supports 17 real applications while resisting OS-level manipulation of system call return values.
- Integration into existing SGX applications with minimal TCB expansion (under 750 LOC).
- Use of formal methods to eliminate implementation bugs that arise from hand-coded Iago-safety checks.
Experimental results
Research questions
- RQ1Can a formally verified filesystem API be constructed to be provably Iago-safe in SGX enclaves?
- RQ2To what extent can such a filesystem maintain expressiveness while ensuring security against system call tampering?
- RQ3How small can the trusted code base be while still supporting practical applications and formal verification?
- RQ4Can the formal specification serve as a test oracle for other Iago-safety mechanisms?
Key findings
- The authors formally verified 118 lemmas and 2 key theorems using 3,676 lines of Coq proof scripts, establishing strong safety guarantees for BesFS.
- BesFS supports 17 real-world applications, demonstrating its practical expressiveness and feasibility in production-like scenarios.
- The trusted code base for BesFS is under 750 lines of code, significantly minimizing the attack surface in SGX environments.
- The formal specification successfully eliminated several known bugs present in hand-coded Iago-safety mechanisms.
- BesFS serves as a reliable test oracle for validating other Iago-safety checks in SGX applications.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.