seccomp: audit and harden Continue-site safety (issue #27)#28
Merged
congwang-mk merged 2 commits intomainfrom May 1, 2026
Merged
seccomp: audit and harden Continue-site safety (issue #27)#28congwang-mk merged 2 commits intomainfrom
congwang-mk merged 2 commits intomainfrom
Conversation
Signed-off-by: Cong Wang <cwang@multikernel.io>
Signed-off-by: Cong Wang <cwang@multikernel.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #27 (the second of the reporter's two asks — explain why each
NotifAction::Continueis safe — plus one concrete hardening surfaced by the audit).3c2acc0): walk everyNotifAction::Continuesite (~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 athandle_chroot_exec(already commented infeb8328) andhandle_chroot_chdir(newly inline-flagged with the same template). Comments only — no semantic changes.aad2a66): fix the one soft weak spot the audit identified —sendmsg_on_behalfpreviously fell through toContinueifread_child_memon the msghdr struct failed, which a racing thread could force by briefly unmapping the address. ReturnsErrno(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_THREADdeny in a follow-up.Test plan
cargo check --workspacecleancargo test --workspace(run by CI)🤖 Generated with Claude Code