Skip to content

Commit 443eee3

Browse files
committed
release: bump version to 1.3.0
1 parent 0729e12 commit 443eee3

8 files changed

Lines changed: 24 additions & 24 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
Kernel-enforced sandboxing for untrusted processes. Two zero-dependency
77
core tools, one shared profile format, plus an optional BPF-LSM module.
88

9-
> **Core vs optional module:** `compartment-user` and
10-
> `compartment-root` are the zero-dependency core. `compartment-bpf`
11-
> is an optional advanced module with kernel and toolchain
12-
> requirements.
9+
> **v1.3.0 note:** `compartment-user` and `compartment-root` are
10+
> unchanged and remain the zero-dependency core. `compartment-bpf`
11+
> is a new optional advanced module for kernel-level inode sealing,
12+
> with its own kernel and toolchain requirements.
1313
1414
> **Note:** This is an open-source Linux isolation toolkit, not a
1515
> formally validated security product. The code has been through

compartment-bpf/LIMITATIONS.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ syntax.)
123123
|----------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|
124124
| **LD_PRELOAD / LD_AUDIT injection** into actor | The kernel sees the legitimate actor binary as caller (exe inode matches). Library injection is in-process; compartment-bpf cannot distinguish in-process tampering. | `tools/compartment-actor-wrapper` (static-linked clean-exec wrapper: `clearenv()` + opt-in `--allow-env` allowlist + DANGEROUS-name guard rejecting LD_PRELOAD/LD_AUDIT/GLIBC_TUNABLES/PYTHONPATH/...); systemd unit `UnsetEnvironment=`; setuid not used. The default is no env survives the wrapper boundary; the guard catches operator mistakes adding dangerous names via `--allow-env`. **Note:** `UnsetEnvironment=LD_PRELOAD` alone leaves `LD_AUDIT`, `LD_DEBUG`, and the other 30+ glibc dynamic-loader vectors active. Use `UnsetEnvironment=~LD_` (the `~` prefix matches by pattern in systemd ≥ v243) or enumerate all `LD_*` names explicitly. The wrapper's clearenv-then-allowlist is the load-bearing control; the systemd directive is defense in depth. |
125125
| **ptrace attach + memory write** of running actor | Once the actor process is running, an attacker with `CAP_SYS_PTRACE` can attach and write its memory. The kernel still sees the actor as caller for any subsequent ops. | `yama.ptrace_scope=2` (kernel cmdline); `no_new_privs`; seccomp filter on `ptrace(2)` for production daemons. The actor-wrapper installs a seccomp denylist that blocks ptrace + `process_vm_{readv,writev}` + `pidfd_getfd` + `kcmp` from the wrapped process itself (does NOT stop a third party from ptracing the actor — pair with Yama). |
126-
| **CAP_BPF + direct map mutation** | A privileged user can `bpftool map update` against `sealed_inodes` / `sealed_dirs` and weaken or wipe seals. The v0 model assumes a trusted load phase. | `SIGNED-POLICY-SPEC.md` §7 `bpf_gate` (future); `bpf_map_freeze` after load (already enforced in v0.3 loader). |
127-
| **Privileged BPF link detach** (`bpf(BPF_LINK_DETACH)` / bpffs link unlink) | A privileged user with `CAP_BPF` can detach the compartment-bpf LSM links at runtime via the `bpf(BPF_LINK_DETACH)` UAPI or by `unlink()`ing the bpffs link pin, removing every hook from the kernel chain in one syscall. This is distinct from `bpftool map update` (which weakens individual seals): a successful detach removes enforcement entirely until the next `--pin`, leaving the system fail-OPEN. | Restrict `CAP_BPF` to the loader and operator accounts (drop from all daemons via systemd `AmbientCapabilities=` / `CapabilityBoundingSet=`); ingest `audit_event` ringbuf into a SIEM that alerts on enforcement-stop; `SIGNED-POLICY-SPEC.md` §7 `bpf_gate` (future) closes this surface at the kernel layer. |
126+
| **CAP_BPF + direct map mutation** | A privileged user can `bpftool map update` against `sealed_inodes` / `sealed_dirs` and weaken or wipe seals. The v0 model assumes a trusted load phase. | Future signed-policy / `bpf_gate` work; `bpf_map_freeze` after load (already enforced in v0.3 loader). |
127+
| **Privileged BPF link detach** (`bpf(BPF_LINK_DETACH)` / bpffs link unlink) | A privileged user with `CAP_BPF` can detach the compartment-bpf LSM links at runtime via the `bpf(BPF_LINK_DETACH)` UAPI or by `unlink()`ing the bpffs link pin, removing every hook from the kernel chain in one syscall. This is distinct from `bpftool map update` (which weakens individual seals): a successful detach removes enforcement entirely until the next `--pin`, leaving the system fail-OPEN. | Restrict `CAP_BPF` to the loader and operator accounts (drop from all daemons via systemd `AmbientCapabilities=` / `CapabilityBoundingSet=`); ingest `audit_event` ringbuf into a SIEM that alerts on enforcement-stop; future signed-policy / `bpf_gate` work is the kernel-layer closure. |
128128
| **Out-of-band kernel writes** | Direct `kmem` writes, kprobe overwrites, or kernel-module loads can disable the LSM hook chain entirely. | Kernel `lockdown=integrity` or `lockdown=confidentiality` (kernel cmdline); `kernel.modules_disabled=1`; Secure Boot. |
129129
| **Offline tampering of the actor binary** | If the attacker boots from rescue media and edits `/usr/sbin/aide` on the unmounted disk, E-6 cannot fire — enforcement is only active at runtime. | LUKS full-disk encryption; signed kernel modules; IMA/EVM file signatures; locked-down boot firmware. |
130130
| **Exec via interpreter chain** (NOT a bypass) | Actor exec's `python /tmp/evil.py``current->mm->exe_file` becomes `python`. File access is then correctly denied because python is not in `actor aide`. This is the intended behavior, listed here so readers don't mistake it for a bypass. | None needed — this is intended fail-closed semantics. |
@@ -192,6 +192,5 @@ is security-load-bearing.
192192
rationale per row.
193193
- `README.md` Limitations section — high-level v0 / v0.3 capability
194194
surface.
195-
- `experimental/SIGNED-POLICY-SPEC.md` — design intent for future
196-
cryptographic policy signing (sealed-agent mode, future exec-trust
197-
seal — not yet shipped).
195+
- Future signed-policy design notes — cryptographic policy signing,
196+
sealed-agent mode, and future exec-trust seal work not yet shipped.

compartment-bpf/ON-RAMP.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ If you are reading this in a fresh clone and want to confirm that
55
pick one of the three paths below. They differ in fidelity, setup
66
cost, and what they prove.
77

8-
For the design rationale, read `experimental/ARCHITECTURE.md`.
8+
For the design rationale, start with `README.md`, `HOWTO.md`, and
9+
`experimental/EXEC-DOMAIN-SPEC.md`.
910

1011
## Path A — full-fidelity KVM VM (production-grade)
1112

compartment-bpf/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ See `LIMITATIONS.md` for the full table. Highlights:
166166
namespace lockdown for stronger guarantees.
167167
- **btrfs / overlayfs anon_bdev**: on these filesystems, `(dev, ino)` can be
168168
reused across bind-mount views of the same inode; see LIMITATIONS.md.
169-
- **No cryptographic policy signing** (design intent in
170-
`experimental/SIGNED-POLICY-SPEC.md`).
169+
- **No cryptographic policy signing** yet.
171170

172171
---
173172

compartment-bpf/experimental/EXEC-DOMAIN-SPEC.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
> Status: draft v0.3, May 2026 — authoritative consolidation of the
44
> exec-domain feature family for compartment-bpf
55
> Audience: implementers, profile authors, reviewers
6-
> Companion to: `SIGNED-POLICY-SPEC.md`, `ARCHITECTURE.md`
6+
> Companion to: the future signed-policy / `bpf_gate` design notes and
7+
> the broader compartment-bpf design rationale
78
> Prerequisite: v0 enforcement surface (existing seal model)
89
> Lineage: LIDS exec-domain (1998–2002) — historical motivation
910
> for the actor-allowlist property; the author's 2001
@@ -300,7 +301,7 @@ worker has the same `mm->exe_file` inode.
300301
- **T-X4. CAP_BPF process direct map mutation.** Root with
301302
`bpftool map update` against the seal map can bypass enforcement
302303
without a kernel-side gate. The v0 model assumes a trusted load
303-
phase. The defense is `SIGNED-POLICY-SPEC.md` §7 `bpf_gate`
304+
phase. The defense is future `bpf_gate` work
304305
*out of this spec's scope* but compatible with it.
305306

306307
- **T-X5. Exec via interpreter chain — NOT a bypass.** Actor
@@ -468,7 +469,7 @@ every failed unpin attempt durable — silent suppression requires
468469
compromising both channels.
469470
470471
The real defense against malicious unpin by a CAP_BPF-equipped
471-
attacker remains `bpf_gate` (see `SIGNED-POLICY-SPEC.md` §7),
472+
attacker remains `bpf_gate` (see the future signed-policy work),
472473
which puts an LSM gate on `BPF_PROG_DETACH` and `BPF_OBJ_GET`
473474
from non-agent tasks. That is out of this spec's scope and is not
474475
implemented in v0.x. Until `bpf_gate` lands, a CAP_BPF user can
@@ -1419,7 +1420,7 @@ unpacker. The unpacker is a transport.
14191420

14201421
### 15.2 What the addendum proposes
14211422

1422-
Two reserved TLVs in `SIGNED-POLICY-SPEC.md` §4.3`EXEC_DELEGATE`
1423+
Two reserved TLVs in the future signed-policy design`EXEC_DELEGATE`
14231424
(0x07) and `DOMAIN_CLAIM_MAP` (0x08) — plus `DOMAIN_FLAG_ALLOW_ANON_EXEC`
14241425
on `DOMAIN_DEF`. Six requirements (R-22..R-27 in the addendum's
14251426
numbering) wire `bpf_gate` to admit claim-map writes only from
@@ -1552,11 +1553,11 @@ additions (T-7 / T-8 / T-9 in the addendum's numbering).
15521553

15531554
## 17. References
15541555

1555-
- `SIGNED-POLICY-SPEC.md` — §7 `bpf_gate`. Compatible with this
1556+
- Future signed-policy / `bpf_gate` work — compatible with this
15561557
spec; not required. Shape B for unpin protection.
1557-
- `ARCHITECTURE.md` — overall component shape; this exec-domain
1558-
family slots into the daemon's existing inode-keyed seal model
1559-
without changing the management-plane assumptions.
1558+
- Broader compartment-bpf design rationale — this exec-domain family
1559+
slots into the daemon's existing inode-keyed seal model without
1560+
changing the management-plane assumptions.
15601561
- `tools/profile-draft.py` — drafting tool that this spec extends
15611562
with discovery-input ingestion (§13). DT_NEEDED expansion is
15621563
explicitly NOT part of this spec; libraries are loaded via
@@ -1607,7 +1608,7 @@ additions (T-7 / T-8 / T-9 in the addendum's numbering).
16071608
binary's identity comes from the binary being itself sealed
16081609
against modification (E-6 for actors, X-6 for exec-trust),
16091610
not from cryptographic measurement. TPM / IMA integration is
1610-
`SIGNED-POLICY-SPEC.md` territory.
1611+
future signed-policy territory.
16111612
- **Not anonymous-inode content verification.** Even with the
16121613
Exec_Enc addendum (§15) adopted, the spec does NOT verify what
16131614
bytes the kernel runs from an anonymous inode; trust is

compartment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#define _GNU_SOURCE
3232
#endif
3333

34-
#define COMPARTMENT_VERSION "1.2.0"
34+
#define COMPARTMENT_VERSION "1.3.0"
3535

3636
#include <stdio.h>
3737
#include <stdlib.h>

man/compartment-root.8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Copyright (c) 2026 Nenad Mićić <nenad@micic.be>
22
.\" SPDX-License-Identifier: Apache-2.0
3-
.TH COMPARTMENT-ROOT 8 "April 2026" "compartment 1.2.0" "System Administration"
3+
.TH COMPARTMENT-ROOT 8 "May 2026" "compartment 1.3.0" "System Administration"
44
.SH NAME
55
compartment-root \- full-namespace process isolation (requires root)
66
.SH SYNOPSIS

man/compartment-user.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" Copyright (c) 2026 Nenad Mićić <nenad@micic.be>
22
.\" SPDX-License-Identifier: Apache-2.0
3-
.TH COMPARTMENT-USER 1 "April 2026" "compartment 1.2.0" "User Commands"
3+
.TH COMPARTMENT-USER 1 "May 2026" "compartment 1.3.0" "User Commands"
44
.SH NAME
55
compartment-user \- userspace process isolation with Landlock, seccomp, and environment sanitization
66
.SH SYNOPSIS

0 commit comments

Comments
 (0)