Commit 94c947d
committed
feat(sandbox): seccomp-notify DNS-pinned allowlist for Platform mode
Add kernel-level connect() interception using SECCOMP_RET_USER_NOTIF.
The supervisor intercepts network syscalls, reads the destination
sockaddr from the child's memory via /proc/pid/mem, evaluates it
against a DNS-pinned allowlist, and either performs the operation on
behalf of the child via pidfd_getfd() or denies it with EPERM.
Components:
- DnsPinnedAllowlist: resolve domains to IPs at sandbox creation,
freeze for session lifetime to prevent DNS rebinding
- BPF filter with AUDIT_ARCH validation for connect/sendto/sendmsg/
recvfrom/recvmsg/bind syscalls
- pidfd_open + pidfd_getfd for TOCTOU-safe on-behalf-of operations
- parse_sockaddr with correct endianness for IPv4/IPv6
- read_process_memory with read_exact for short-read safety
Signed-off-by: Ladislav Smola <lsmola@redhat.com>1 parent 240032e commit 94c947d
2 files changed
Lines changed: 583 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
0 commit comments