This repository was archived by the owner on Nov 12, 2026. It is now read-only.
Repository navigation
Commit 2446c42
committed
feat(sandbox): seccomp-notify network enforcement for Platform mode
Add kernel-level connect() interception using SECCOMP_RET_USER_NOTIF
for Platform mode. Provides mandatory, syscall-level network enforcement
without any capabilities.
Components:
- DnsPinnedAllowlist: DNS pinning at sandbox creation, frozen IPs
- BPF filter with AUDIT_ARCH validation (prevents x32 ABI bypass)
- Notification fd ioctls (recv, send, id_valid)
- pidfd_open/pidfd_getfd for on-behalf-of connect (TOCTOU-safe)
- read_process_memory via /proc/pid/mem with read_exact (no short reads)
- sockaddr parser (AF_INET/AF_INET6, correct endianness)
- deny/allow_connect response helpers
Also fixes from code review:
- driver.rs: use typed enum comparison instead of magic integer == 1
- landlock.rs: saturating_sub to prevent underflow in skipped count
- landlock.rs: upgrade TCP port failure log from debug to warn
8 tests. Compiles, 949 tests pass, clippy clean.
Ref: NVIDIA#8991 parent 9ec5718 commit 2446c42
4 files changed
Lines changed: 551 additions & 8 deletions
File tree
- crates
- openshell-driver-kubernetes/src
- openshell-sandbox/src
- sandbox/linux
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | | - | |
244 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
245 | 246 | | |
246 | 247 | | |
247 | 248 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
258 | | - | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| |||
0 commit comments