Skip to content

seccomp: audit and harden Continue-site safety (issue #27)#28

Merged
congwang-mk merged 2 commits intomainfrom
issue-27-continue-audit
May 1, 2026
Merged

seccomp: audit and harden Continue-site safety (issue #27)#28
congwang-mk merged 2 commits intomainfrom
issue-27-continue-audit

Conversation

@congwang-mk
Copy link
Copy Markdown
Contributor

Summary

Addresses #27 (the second of the reporter's two asks — explain why each NotifAction::Continue is safe — plus one concrete hardening surfaced by the audit).

  • Commit 1 (3c2acc0): walk every NotifAction::Continue site (~130 across 10 files) and add module-level safety contracts. Three categories surfaced — pass-through fall-throughs, register-arg decisions (TOCTOU-immune), and path-rewrite-then-Continue. Only the third category is a real TOCTOU surface; it appears at handle_chroot_exec (already commented in feb8328) and handle_chroot_chdir (newly inline-flagged with the same template). Comments only — no semantic changes.
  • Commit 2 (aad2a66): fix the one soft weak spot the audit identified — sendmsg_on_behalf previously fell through to Continue if read_child_mem on the msghdr struct failed, which a racing thread could force by briefly unmapping the address. Returns Errno(EFAULT) instead, refusing the syscall rather than letting it slip past the IP allowlist check.

The remaining structural TOCTOU (chroot exec/chdir path rewrite) is bounded by Landlock and called out for an opt-in CLONE_THREAD deny in a follow-up.

Test plan

🤖 Generated with Claude Code

Signed-off-by: Cong Wang <cwang@multikernel.io>
Signed-off-by: Cong Wang <cwang@multikernel.io>
@congwang-mk congwang-mk merged commit ebdee52 into main May 1, 2026
8 checks passed
@congwang-mk congwang-mk deleted the issue-27-continue-audit branch May 1, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant