arXiv:2609.03849cs.CRSep 2026

Manuscript Offprint

arXiv:2609.03849

NACRE: Rethinking Confidential Containers through Native Architectural Support

Linke Song, Wenhao Wang, Weijie Liu, Rui Hou

Linke Song*†, Wenhao Wang*†✉, Weijie Liu‡, Rui Hou*†

*State Key Laboratory of Cyber Space Security, Defense Institute of Information Engineering, CAS, Beijing, China

†School of Cybersecurity, University of Chinese Academy of Sciences, Beijing, China

‡Nankai University

Abstract—Linux containers achieve high density and fast lifecycle operations by sharing the host kernel, but this design also lets a compromised host inspect or modify container state. Existing confidential-computing systems protect an enclave address space or an entire guest operating system, while recent container-granularity systems still add a separate protection context. These abstractions do not make a dynamic group of host-managed Linux processes the architectural protection unit.

This paper presents NACRE, a RISC-V hardware-software co-design for native confidential containers. Its key insight is to separate the host's authority to manage resources from its authority to access or commit protected state. Hardware-recognized container identities direct protected traps to an isolated S-mode agent, while an M-mode monitor commits security-sensitive identity, mapping, and page transitions. The agent delegates services to host Linux without changing satp; services that neither access private bytes nor modify protected state also avoid M-mode. We prototype NACRE by extending QEMU, OpenSBI, Linux, a trusted agent, and runc. The prototype implements the single-container private-memory substrate and covered launch, fault, fork/COW, user-access, and teardown paths. Across five Imbench syscall and pipe metrics, the three-run means remain within 3.5% of the runc-origin baseline. With the eight nginx object-size means weighted equally, aggregate throughput is 1.9% lower.

I. INTRODUCTION

Linux containers have become a fundamental abstraction for deploying modern workloads. By combining namespaces, control groups, and filesystem isolation while sharing the host kernel, containers avoid virtual hardware and a separate guest operating system, thereby providing low startup latency, a small memory footprint, and efficient resource sharing [29], [31]. These properties have made containers widely used in cloud-native services, edge platforms, and high-performance computing environments [12], [13], [24]. More recently, AI-agent systems have begun launching containers on demand as sandboxes for tool invocation and generated-code execution. For example, LangGraph deploys self-hosted agent servers through container images and orchestration platforms [25], while OpenHands isolates agent-generated commands in Docker containers [32]. These emerging workloads further increase the demand for execution environments that combine strong isolation with the efficiency and flexibility of native containers.

The efficiency of containers, however, relies on a strong security assumption: the host operating system is trusted. Namespaces and control groups restrict the visibility and resource usage of container processes, but their enforcement ultimately depends on the host kernel. Once the host kernel or a privileged administrator is compromised, the attacker can inspect container memory, modify page mappings and execution state, forge kernel-maintained container metadata, or access sensitive data such as credentials and user inputs. Consequently, conventional containers cannot protect workloads deployed on infrastructure whose privileged software is not fully trusted.

In this work, we define a native confidential container as a hardware-protected, dynamically managed group of Linux processes that continues to use host-native scheduling and resource management without relying on the host OS for the confidentiality or integrity of its execution state. The host may decide when processes run and which physical resources are allocated, but it must not be able to access protected container state, forge container membership, or convert resource-management authority into permission to read or modify protected resources. Realizing this abstraction requires three properties. First, the container must itself be the protection and lifecycle unit. Processes should be able to join and leave a protected container through operations such as fork, clone, exec, and exit, without reconstructing the protection boundary. Second, applications must retain native Linux process semantics, including copy-on-write memory, shared memory, signals, and synchronization among mutually trusting processes, without requiring source-code modification or a replacement programming model. Third, the host must continue to perform ordinary scheduling and resource-management functions, while access control and security-sensitive state transitions are enforced independently of the untrusted host. In particular, frequent container operations should not require switching into a VM, changing to a separate protected address space, or repeatedly invoking a high-privilege security monitor.

Existing confidential-computing abstractions do not simultaneously provide these properties. Enclave-based systems protect an isolated address space or a designated protected memory region [5], [9], [17], [26], [39]. Enclave runtimes can improve application compatibility, but the protection boundary remains different from a dynamically changing container process group. Supporting multi-process applications therefore requires reconstructing Linux process abstractions inside a library OS or runtime, or coordinating process and resource sharing across protected execution contexts. This complicates dynamic process management and weakens compatibility with native Linux semantics.

Confidential virtual machines take the opposite approach by protecting an entire guest OS using hardware mechanisms such as AMD SEV, Intel TDX, and Arm CCA [4], [21], [23], [38]. VM-backed container systems, including Kata Containers and Confidential Containers, preserve Linux compatibility by placing containers together with a guest kernel and supporting services inside a protected VM [14], [15], [35]. However, the VM rather than the container becomes the hardware protection and resource-management unit. Container creation, memory allocation, process management, and I/O are consequently distributed across the guest kernel, virtual machine monitor, and host. The additional guest software stack also reduces the density and responsiveness that motivate native containers.

Recent container-granularity approaches attempt to bridge the gap between enclaves and CVMs by moving protection closer to container processes while retaining selected host services [20], [43], [44], [46], [48]. However, these systems still introduce additional protection contexts or virtualization layers to mediate host interactions. As a result, they either sacrifice native Linux semantics or incur non-negligible overhead in frequent container operations. The container itself is not a hardware-recognized execution identity that can directly govern process membership, resource ownership, and security-event delivery while coexisting with the host's native resource-management path.

The fundamental difficulty is that conventional hardware conflates two roles of the host OS: managing resources and serving as the security authority for those resources. Native containers require the host to retain the former role for efficiency, but an untrusted host cannot safely retain the latter. This tension is particularly visible on interrupts and exceptions. Delivering a confidential container's events directly to the host exposes its architectural state to untrusted privileged software. Delivering every event to a high-privilege security monitor avoids this exposure, but places frequent system interactions on a costly path involving additional privilege transitions and protection-context changes. Native confidential containers therefore require both a hardware-recognized container identity and a protected mediation path that does not place a high-privilege monitor on every common operation.

Based on this observation, we present NACRE, a RISC-V hardware-software co-design architecture for native confidential containers. NACRE introduces container identity as architectural security state. Hardware associates execution contexts and protected resources with a container identity and performs access checks and event routing using this identity rather than host-maintained process metadata. Trusted mechanisms control the creation, inheritance, and revocation of identities, preventing the host from forging container membership or obtaining access to protected resources through page remapping.

NACRE further separates frequent mediation from security-critical enforcement through two isolated components. A lightweight trusted container agent executes at the same architectural privilege level as the host kernel but resides in a distinct hardware protection domain. Identity-aware event routing delivers interrupts and exceptions originating from confidential containers to this agent, preventing the untrusted host from becoming the first recipient of protected architectural state. The agent protects container context and mediates interactions with host-provided Linux services, while events from ordinary host processes continue to follow the conventional Linux path. A minimal security monitor executes at a higher security level and handles only security-critical operations, such as container-identity management and protected-resource ownership transitions.

This separation allows frequent container-host interactions to remain in the native address-space and privilege context. The delegated trap path does not require entering a VM, switching page tables, or flushing the TLB; when a service neither accesses private bytes nor changes protected state, it also avoids the high-privilege monitor. The host can therefore continue to provide scheduling, physical-memory allocation, and ordinary Linux services, while hardware-enforced container identity prevents it from directly accessing protected state or fabricating security-relevant ownership. Dynamic process operations and inter-process sharing are expressed as changes within the same container identity rather than as coordination across independent protection contexts.

We implement a functional prototype spanning QEMU, OpenSBI, Linux, a trusted agent, and runc. It integrates registration and exec, demand paging, protected PTE updates, eager fork into fresh child pages, copy-on-write, typed kernel access to private user buffers, and teardown with the ordinary Linux lifecycle. The evaluated scope is the single-container private-memory substrate; cross-container ownership, protected shared objects, and attestation remain design-level mechanisms in this version.

QEMU-based functional tests exercise the covered launch and memory paths, and a dedicated parent/child workload validates the implemented fork transaction. For five lmbench syscall and pipe metrics, the three-run means are within 3.5% of the same-daemon runc-origin arm. With the eight nginx object-size means weighted equally, aggregate throughput is 1.9% lower. These results establish the feasibility of the native execution path and characterize its observed end-to-end behavior in QEMU.

Contributions. This paper makes the following contributions:

We formulate the abstraction of native confidential containers and identify the fundamental conflict between untrusted-host isolation and host-native resource management. We derive the requirements for making a dynamic Linux process group the hardware protection and lifecycle unit while preserving native multi-process semantics.

We design NACRE, a RISC-V hardware-software co-design architecture that introduces hardware-recognized container identities, identity-aware resource protection, and identity-aware event routing. NACRE separates a peer-privilege trusted container agent for frequent mediation from a high-privilege security monitor that commits security-sensitive state; delegated services that access neither private bytes nor protected state avoid heavyweight protection-context transitions.

• We implement a QEMU-based prototype across OpenSBI, Linux, a trusted agent, and runc. The prototype preserves the covered native launch, private-memory, fork/COW, and teardown paths, and our preliminary evaluation characterizes common service paths and container workloads.

References (49)