Skip to content

Commit fd2ea7b

Browse files
committed
docs: RFC for seccomp-notify network enforcement in Platform mode
Design proposal for kernel-level domain/IP filtering using SECCOMP_RET_USER_NOTIF. Alternative to Landlock TCP port restriction for standalone deployments without a proxy. Implementation: ~300-500 LOC, 2-3 weeks. All kernel features available on RHEL 9 / OpenShift 4.18. Ref: NVIDIA#899
1 parent a7ad2cd commit fd2ea7b

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# seccomp-notify Network Enforcement for Platform Mode
2+
3+
**Status:** Proposal
4+
**Depends on:** Platform Mode (PR #12)
5+
**Related:** NVIDIA/OpenShell#899, Landlock TCP port restriction (PR #13)
6+
7+
## Goal
8+
9+
Add kernel-level domain/IP filtering to Platform Mode using seccomp-notify
10+
(SECCOMP_RET_USER_NOTIF). The supervisor intercepts connect(), sendto(),
11+
and sendmsg() at the syscall dispatch boundary, evaluates the destination
12+
against a DNS-pinned OPA allowlist, and performs the operation on behalf of
13+
the child -- or denies it with EPERM.
14+
15+
This provides mandatory, kernel-enforced domain filtering without any
16+
capabilities, as an alternative to the Landlock TCP port restriction (PR #13)
17+
which only filters by port.
18+
19+
## When to use this vs Landlock TCP port restriction
20+
21+
| | Landlock port (PR #13) | seccomp-notify (this) |
22+
|---|---|---|
23+
| Filters by | TCP port only | IP + port + domain |
24+
| Proxy required | Yes (domain filtering at proxy) | No (domain filtering at syscall) |
25+
| Overhead | Negligible (LSM hook) | ~35us per mediated syscall |
26+
| Complexity | Low (~40 LOC) | High (~300-500 LOC) |
27+
| Best for | Deployments WITH a proxy | Standalone WITHOUT a proxy |
28+
29+
## Architecture
30+
31+
The supervisor forks before exec'ing the agent. The child installs a seccomp
32+
filter with SECCOMP_FILTER_FLAG_NEW_LISTENER. The parent handles notifications
33+
asynchronously and performs on-behalf-of operations via pidfd_getfd().
34+
35+
## RHEL 9 / OpenShift 4.18 compatibility
36+
37+
All required features available: SECCOMP_RET_USER_NOTIF (5.0),
38+
SECCOMP_IOCTL_NOTIF_ADDFD (5.9), pidfd_getfd (5.6), crun SCMP_ACT_NOTIFY.
39+
40+
## Effort
41+
42+
~300-500 LOC, 2-3 weeks.
43+
44+
## Reference
45+
46+
- Sandlock: https://github.com/multikernel/sandlock
47+
- Paper: https://arxiv.org/html/2605.26298v1
48+
- seccomp_unotify(2): https://www.man7.org/linux/man-pages/man2/seccomp_unotify.2.html

0 commit comments

Comments
 (0)