SoK: Software Compartmentalization
Hugo Lefeuvre, Nathan Dautenhahn, David Chisnall, Pierre Olivier
IEEE Symposium on Security and Privacy 2025 · Day 3 · Systems Security and Access Control
Overview
In an era where software vulnerabilities are a constant threat, the principle of least privilege stands as a critical last line of defense. This talk, "SoK: Software Compartmentalization," presented at IEEE S&P, delves into a specific implementation of this principle: software compartmentalization. Given by Hugo Lefeuvre, with joint work from Nathan Dautenhahn, David Chisnall, and Pierre Olivier, the presentation introduces a comprehensive Systematization of Knowledge (SoK) that defines, categorizes, and analyzes the state-of-the-art in software compartmentalization. The core premise is that by splitting a program into isolated, distrusting components, an attacker who breaches one compartment will not automatically gain full control over the entire application, thereby significantly reducing the impact of successful exploits.

Key moments
- 0:00 Introduction to software compartmentalization and its purpose
- 1:30 Demonstrating compartmentalization's impact with OpenSSH vulnerability
- 2:00 Why compartmentalization remains rare despite its benefits
- 2:40 Our systematic approach to understanding compartmentalization challenges
- 3:20 Key definition: compartmentalization is within a program
- 5:00 Three core categories of the compartmentalization taxonomy
- 7:10 Mismatch: research vs. real-world needs regarding availability
- 8:00 Core challenge: compartmentalization pillars are rarely co-designed
SoK: Software Compartmentalization
Speakers: Hugo Lefeuvre, Nathan Dautenhahn, David Chisnall, Pierre Olivier
Conference: IEEE S&P
YouTube: https://www.youtube.com/watch?v=nG-iaBk3Moo
Overview
In an era where software vulnerabilities are a constant threat, the principle of least privilege stands as a critical last line of defense. This talk, "SoK: Software Compartmentalization," presented at IEEE S&P, delves into a specific implementation of this principle: software compartmentalization. Given by Hugo Lefeuvre, with joint work from Nathan Dautenhahn, David Chisnall, and Pierre Olivier, the presentation introduces a comprehensive Systematization of Knowledge (SoK) that defines, categorizes, and analyzes the state-of-the-art in software compartmentalization. The core premise is that by splitting a program into isolated, distrusting components, an attacker who breaches one compartment will not automatically gain full control over the entire application, thereby significantly reducing the impact of successful exploits.
Despite its proven effectiveness in securing high-profile software like web browsers and server applications such as OpenSSH, compartmentalization remains an underutilized practice in the broader software ecosystem. The research reveals a stark reality: fewer than 56 out of the approximately 1,500 most popular Debian applications are compartmentalized. This critical gap between potential and practice motivated the authors to undertake this SoK. Their work aims to draw a clear picture of the current landscape, identify the underlying reasons for this limited adoption, and chart a path forward for making compartmentalization a more widespread and accessible engineering practice, ultimately making modern software systems inherently safer.
Background
▶ Watch: Introduction to software compartmentalization and its purpose (0:00)
Modern software systems are inherently complex, often comprising millions of lines of code and interacting with diverse external components. This complexity inevitably leads to a constant stream of high-impact security vulnerabilities. While various defensive mechanisms exist—from robust coding practices and input validation to intrusion detection systems—these defenses are prone to failure. When the primary layers of defense are bypassed, the principle of least privilege becomes paramount. This principle dictates that any subject (be it a user, process, or component) should only be granted the minimum set of permissions strictly necessary to perform its intended function. Its purpose is to limit the potential damage an attacker can inflict if they successfully compromise a part of the system.
Software compartmentalization is a direct implementation of this principle, specifically applied within a single program. The talk clarifies this crucial scope: compartmentalization isolates components inside an application, distinguishing it from broader concepts like isolating different applications from each other or isolating an application from the operating system kernel, which the authors classify as more general cases of isolation. The benefits of this approach are substantial, as illustrated by a vulnerability in OpenSSH. A high-profile remote code execution (RCE) vulnerability, which would typically be catastrophic, was contained by OpenSSH's compartmentalization design to an unprivileged process. This containment dramatically reduced its severity from a critical remote compromise to a minor issue, preventing the attacker from immediately accessing sensitive data like session keys.
Despite such compelling success stories, the research highlights that compartmentalization is far from a widespread engineering practice. The authors began their SoK by identifying a fundamental problem: even experts often disagree on what constitutes software compartmentalization. This ambiguity necessitates a unified understanding and consistent terminology. To address this, the researchers developed a fundamental model and a precise definition, laying the groundwork for a systematic evaluation. They then embarked on a comprehensive survey, manually filtering program proceedings from major security and systems venues over two decades. This initial sweep was augmented by a snowballing technique, recursively inspecting references of identified papers to uncover more relevant works, and by incorporating additional papers from the authors' own expertise. This meticulous process yielded over 200 relevant works, with 106 of them proposing concrete compartmentalization approaches, which then formed the basis for their detailed taxonomy.
Key Findings
▶ Watch: Why compartmentalization remains rare despite its benefits (2:00)
The Systematization of Knowledge presented in the talk yielded several critical findings that illuminate the current state and future challenges of software compartmentalization:
- Lack of Consensus on Definition: A primary finding was the absence of a universally agreed-upon definition of software compartmentalization among experts. This ambiguity hinders research, development, and adoption. The SoK addresses this by proposing a fundamental model and consistent terminology that strictly defines compartmentalization as isolation within a program, setting it apart from broader inter-program or application-to-OS isolation.
- Comprehensive Taxonomy: The researchers developed a robust taxonomy based on analyzing over 200 research and mainstream compartmentalization efforts. This taxonomy structures approaches around three core pillars: privilege definition methods (policies), compartmentalization abstractions, and compartmentalization mechanisms. This categorization provides a systematic framework for understanding and evaluating different techniques.
- Low Adoption Rate: A striking quantitative finding is the extremely low adoption of compartmentalization in mainstream software. The study found that fewer than 56 applications out of approximately 1,500 of the most popular Debian applications are compartmentalized. This statistic underscores the significant gap between the proven security benefits and actual engineering practice.
- Mismatch in Availability Focus: The study revealed a notable discrepancy between research priorities and real-world deployment needs. Most research-proposed compartmentalization abstractions tend to consider availability out of scope, primarily focusing on confidentiality and integrity. However, the analysis of mainstream compartmentalized software (a set of 61 programs found in the Debian archive) demonstrated that most real-world deployments explicitly target a degree of availability, indicating that research ideas might be difficult to deploy if they do not account for this practical requirement.
- Lack of Co-Design Across Pillars: A significant core challenge identified is that the three pillars of compartmentalization—policies, abstractions, and mechanisms—are almost never co-designed. Researchers often adopt a "divide and conquer" approach, solving individual problems in isolation. This results in friction across the stack, where policies cannot be efficiently represented by existing abstractions, abstractions do not map effectively to enforcement methods, and enforcement methods fail to expose typical partitioning needs efficiently. This disjointed development hinders the creation of practical, deployable solutions.
These findings collectively paint a picture of a powerful security paradigm held back by definitional ambiguities, misaligned research priorities, and a lack of holistic design thinking, all contributing to its limited adoption in the broader software landscape.
Technical Deep Dive
▶ Watch: Key definition: compartmentalization is within a program (3:20)
The core of the SoK lies in its comprehensive taxonomy, which dissects software compartmentalization into three fundamental, yet often disconnected, pillars: privilege definition methods (policies), compartmentalization abstractions, and compartmentalization mechanisms. Understanding these components and their interactions is crucial for designing effective compartmentalized systems.
- Privilege Definition Methods (Policies): This initial stage involves defining what needs to be isolated and how. It's about establishing the security policy—which components should be separated, what resources they can access, and what privileges they require. The talk mentions that this can range from manual, meticulous analysis of an application's architecture to identify boundaries, to using automated or semi-automated tools that might analyze code dependencies or resource access patterns to suggest partitioning. Policies define the desired state of isolation and interaction between compartments. This is often a programming language (PL) heavy topic, as it involves understanding program semantics and control flow.
- Compartmentalization Abstractions: Once a policy is defined, an abstraction provides the conceptual model for implementing that policy within the software. This is the programmatic interface or model through which developers interact with the compartmentalization framework. Examples include:
- Processes: A common and robust abstraction, leveraging operating system process isolation. Each compartment runs as a separate process, benefiting from strong memory and resource separation.
- Threads: While offering less isolation than processes, certain designs might use threads with specific memory protection schemes.
- Virtual Machines (VMs): In some contexts, lightweight VMs or micro-VMs can serve as abstractions for very strong isolation.
- Software-defined compartments: Custom, application-specific abstractions that might offer finer-grained control than OS processes, often relying on language-based sandboxing or specific runtime environments.
The talk highlights a critical observation: very few research-proposed abstractions enforce availability. While they prioritize confidentiality and integrity, real-world deployments often require that compartmentalization not only prevents data leakage or corruption but also ensures the continued operation of the service, even if one compartment is compromised. This mismatch between research focus and practical needs makes many academic solutions difficult to deploy. This pillar is often a network operating system (NOS) topic, concerning how the system presents and manages isolation.
- Compartmentalization Mechanisms: These are the underlying hardware and software features that physically enforce the isolation defined by the abstraction and policy at runtime. They are the low-level enforcers of the security boundaries. Examples include:
- Page Tables: A fundamental mechanism in modern operating systems, used to map virtual memory addresses to physical addresses, thereby isolating the memory space of different processes. If the process abstraction is used, page tables are the primary enforcement mechanism.
- Memory Protection Units (MPUs): Hardware components, often found in embedded systems, that enforce memory access permissions for different regions of memory.
- System Calls: The operating system mediates access to resources via system calls, which can be restricted for specific compartments (e.g., using seccomp filters in Linux).
- Virtualization Extensions: Hardware features like Intel VT-x or ARM VMSAv8 that enable efficient virtualization, providing strong isolation between virtualized environments.
This aspect is typically an architecture topic, dealing with the interaction between software and hardware to enforce security.
The most significant technical challenge identified is the almost universal lack of co-design among these three pillars. Researchers, in their pursuit of solving complex problems, often isolate one pillar (e.g., developing a new abstraction) without fully considering its implications for policy definition or the feasibility of its underlying enforcement mechanisms. This "divide and conquer" approach, while simplifying individual research problems, leads to significant friction across the stack:
- Policies developed with a specific security goal in mind might not be efficiently representable or expressible using existing compartmentalization abstractions.
- Abstractions designed for elegance or performance might not map effectively or securely to available hardware or software enforcement methods.
- Enforcement methods, often tied to specific hardware capabilities, might not efficiently expose the granular partitioning needs implied by sophisticated policies or abstractions.
This disconnect results in solutions that are difficult to integrate, inefficient, or impractical for real-world deployment. The SoK argues that for compartmentalization techniques to gain widespread adoption, a holistic approach that considers the entire stack—from policy definition to hardware enforcement—is essential.
Demo / Proof of Concept
▶ Watch: Three core categories of the compartmentalization taxonomy (5:00)
The talk "SoK: Software Compartmentalization" constitutes a Systematization of Knowledge, which is a comprehensive survey and analysis of an existing field rather than the presentation of a novel exploit, tool, or specific technical implementation. Consequently, the presentation did not include a live demonstration or a proof of concept of a particular compartmentalization technique, nor did it showcase the exploitation of a vulnerability contained by compartmentalization. The focus was on defining concepts, categorizing existing approaches, and identifying challenges, rather than on demonstrating a working system.
Defensive Implications
▶ Watch: Core challenge: compartmentalization pillars are rarely co-designed (8:00)
The findings from this SoK carry significant implications for software defenders, highlighting both the immense value of software compartmentalization and the obstacles to its broader adoption.
Firstly, the core message that compartmentalization makes systems safer and is needed "now more than ever" must resonate with development and security teams. It serves as a crucial last resort when other defenses fail, turning potentially catastrophic vulnerabilities into minor incidents, as exemplified by OpenSSH. Defenders should view compartmentalization not as an optional add-on, but as a fundamental architectural principle for any security-critical or network-facing application.
Developers and architects should actively adopt the principle of least privilege at the design phase. This means meticulously identifying the minimum necessary privileges for each component or module within a program and designing explicit boundaries around them. The SoK's taxonomy provides a valuable framework for this, prompting questions about the desired policy, the most suitable abstraction (e.g., processes, custom sandboxes), and the underlying mechanisms (e.g., page tables, seccomp) that will enforce these boundaries.
A key takeaway for defenders is the importance of co-designing the three pillars of compartmentalization: policies, abstractions, and mechanisms. Rather than adopting disparate solutions for each, a holistic approach is necessary to avoid the "friction across the stack" identified by the researchers. Security architects should strive for solutions where the chosen policy can be efficiently represented by the abstraction, and the abstraction can be effectively and performantly enforced by the underlying mechanisms. This might involve evaluating new hardware capabilities or runtime environments that offer better support for fine-grained isolation.
Furthermore, defenders need to consider availability alongside confidentiality and integrity when designing compartmentalized systems. The research indicates that while academic work often overlooks availability, real-world deployments prioritize it. A compartmentalization strategy that sacrifices the availability of critical services in the event of a breach might not be acceptable in many operational environments. Solutions must be robust enough to allow non-compromised compartments to continue functioning, ensuring service continuity.
Finally, the low adoption rate (fewer than 56 out of 1,500+ Debian apps) signals a need for greater awareness, education, and the development of more accessible tools and frameworks. Defenders should advocate for better language support, runtime environments, and OS features that simplify the implementation of robust compartmentalization. They should also study successful existing implementations in high-profile software (like web browsers or OpenSSH) to derive best practices and patterns that can be applied to their own projects. The SoK provides a foundational understanding to guide these efforts, encouraging a more complete perspective on compartmentalization research and development.
Key Takeaways
- Compartmentalization is an essential, underutilized security defense: It implements the principle of least privilege within a program, significantly reducing the impact of successful exploits by confining attackers to isolated components.
- Widespread adoption is critically lacking: Despite its proven benefits in high-profile software (e.g., OpenSSH, web browsers), fewer than 56 out of 1,500+ popular Debian applications are compartmentalized, highlighting a major gap in security engineering practice.
- A foundational model and taxonomy are now available: The SoK provides a consistent definition of software compartmentalization and a three-pillar taxonomy (privilege definition methods/policies, abstractions, and mechanisms) to systematically analyze and understand different approaches.
- Key challenges hinder adoption: These include inconsistent definitions, a mismatch between research focus (confidentiality/integrity) and real-world needs (availability), and crucially, a lack of co-design among the three pillars, leading to friction and impractical solutions.
- Holistic, stack-aware design is crucial for future progress: To overcome current limitations and enable widespread adoption, future research and development must consider the entire compartmentalization stack, ensuring policies, abstractions, and mechanisms are designed to compose efficiently and effectively.
- Defenders must prioritize and implement compartmentalization: Organizations should integrate the principle of least privilege and compartmentalization early into their software development lifecycle, leveraging the insights from this SoK to build more resilient systems.
About the Speaker(s)
The talk "SoK: Software Compartmentalization" was presented by Hugo Lefeuvre and is the result of a joint research effort with Nathan Dautenhahn, David Chisnall, and Pierre Olivier. While specific titles and affiliations beyond their involvement in this IEEE S&P paper are not detailed in the transcript, their collective work demonstrates their expertise as researchers in the field of computer security and systems. They are dedicated to understanding and advancing the state-of-the-art in software security, particularly through systematic analysis and the identification of fundamental challenges. Their contribution to this Systematization of Knowledge paper underscores their commitment to providing a clearer, more structured understanding of complex security paradigms to the broader research and engineering communities.