Table of Contents
Fetching ...

Compartmentalization-Aware Automated Program Repair

Jia Hu, Youcheng Sun, Pierre Olivier

TL;DR

This paper presents a work in progress investigating the suitability of LLM-based APR at securing cross-compartment interfaces as automatically as possible, and presents the design, implementation, and early results of a new APR framework dedicated to compartment interface safety.

Abstract

Software compartmentalization breaks down an application into compartments isolated from each other: an attacker taking over a compartment will be confined to it, limiting the damage they can cause to the rest of the application. Despite the security promises of this approach, recent studies have shown that most existing compartmentalized software is plagued by vulnerabilities at cross-compartment interfaces, allowing an attacker taking over a compartment to escape its confinement and negate the security guarantees expected from compartmentalization. In that context, securing cross-compartment interfaces is notoriously difficult and engineering-intensive. In light of recent advances in Automated Program Repair (APR), notably through the use of Large Language Models (LLMs), this paper presents a work in progress investigating the suitability of LLM-based APR at securing cross-compartment interfaces as automatically as possible. We observe that existing APR approaches and general purpose/code-centric LLMs used as is are unfit for this task, and present the design, implementation, and early results of a new APR framework dedicated to compartment interface safety. The framework integrates into a feedback loop 1) a specialized fuzzer uncovering cross-compartment interface vulnerabilities; 2) a patch generation component bridging the lack of compartmentalization awareness of existing LLMs with a series of analysis techniques; and 3) a patch validation component assessing the effectiveness of generated vulnerability fixes. We validate our framework over a sample interface vulnerability, comparing it to a naive use of general-purpose LLMs, and discuss future research avenues.

Compartmentalization-Aware Automated Program Repair

TL;DR

This paper presents a work in progress investigating the suitability of LLM-based APR at securing cross-compartment interfaces as automatically as possible, and presents the design, implementation, and early results of a new APR framework dedicated to compartment interface safety.

Abstract

Software compartmentalization breaks down an application into compartments isolated from each other: an attacker taking over a compartment will be confined to it, limiting the damage they can cause to the rest of the application. Despite the security promises of this approach, recent studies have shown that most existing compartmentalized software is plagued by vulnerabilities at cross-compartment interfaces, allowing an attacker taking over a compartment to escape its confinement and negate the security guarantees expected from compartmentalization. In that context, securing cross-compartment interfaces is notoriously difficult and engineering-intensive. In light of recent advances in Automated Program Repair (APR), notably through the use of Large Language Models (LLMs), this paper presents a work in progress investigating the suitability of LLM-based APR at securing cross-compartment interfaces as automatically as possible. We observe that existing APR approaches and general purpose/code-centric LLMs used as is are unfit for this task, and present the design, implementation, and early results of a new APR framework dedicated to compartment interface safety. The framework integrates into a feedback loop 1) a specialized fuzzer uncovering cross-compartment interface vulnerabilities; 2) a patch generation component bridging the lack of compartmentalization awareness of existing LLMs with a series of analysis techniques; and 3) a patch validation component assessing the effectiveness of generated vulnerability fixes. We validate our framework over a sample interface vulnerability, comparing it to a naive use of general-purpose LLMs, and discuss future research avenues.
Paper Structure (35 sections, 2 figures, 2 tables)

This paper contains 35 sections, 2 figures, 2 tables.

Figures (2)

  • Figure 1: Trust models enforced by software compartmentalization, with the direction of attacks exploiting CIVs by corrupting the control or data flowing between untrusted and trusted compartments.
  • Figure 2: Overview of our compartmentalization-aware APR framework. It takes as inputs (green boxes) an application's source code, a description of its desired compartmentalization policy and of a particular cross-compartment interface to secure. A CIV Fuzzer uncovers CIVs on that interface, and these CIVs are fed to the patch generation component. That component analyzes the CIV and other inputs to construct a prompt for a LLM to generate a candidate patch addressing for the CIV. That patch is then validated by invoking the fuzzer again to check if the CIV is properly fixed. The process iterates until the CIV is fully addressed, or the framework determines it cannot do so.