Skip to content

Add clone3 namespace-flag regression tests#44

Merged
jserv merged 1 commit intomainfrom
clone3
Apr 1, 2026
Merged

Add clone3 namespace-flag regression tests#44
jserv merged 1 commit intomainfrom
clone3

Conversation

@jserv
Copy link
Copy Markdown
Contributor

@jserv jserv commented Apr 1, 2026

Guest test binary exercises all 8 CLONE_NEW* flag individually, combined flag, fail-closed EPERM path for unreadable clone_args, and a plain-fork sanity check proving clone3 routes through the supervisor (not the BPF deny list).

Integration harness runs with --forward-verbose and matches supervisor's "clone3 denied: namespace flags" log line, so regression check proves active supervisor interception rather than relying on host-kernel EPERM semantics.

Change-Id: I45a680f5f2b31978abb792f03351873c618e5ed9


Summary by cubic

Add clone3 namespace-flag regression tests to verify the supervisor blocks all CLONE_NEW* flags and fails closed (EPERM) on unreadable clone_args, with a plain-fork success check. The harness now validates 9 denials via the kbox: clone3 denied: namespace flags log.

  • New Features
    • Added tests/guest/clone3-test.c covering each CLONE_NEW* flag, a combined case, unreadable clone_args -> EPERM, and a plain clone3 fork success.
    • Updated scripts/run-tests.sh to run clone3-test in seccomp mode with --forward-verbose, count 9 denial logs, and skip if the binary is missing in the rootfs.

Written for commit 0000de4. Summary will update on new commits.

cubic-dev-ai[bot]

This comment was marked as resolved.

Guest test binary exercises all 8 CLONE_NEW* flag individually, combined
flag, fail-closed EPERM path for unreadable clone_args, and a plain-fork
sanity check proving clone3 routes through the supervisor (not the BPF
deny list).

Integration harness runs with --forward-verbose and matches supervisor's
"clone3 denied: namespace flags" log line, so regression check proves
active supervisor interception rather than relying on host-kernel EPERM
semantics.

Change-Id: I45a680f5f2b31978abb792f03351873c618e5ed9
@jserv jserv merged commit a86febb into main Apr 1, 2026
5 checks passed
@jserv jserv deleted the clone3 branch April 1, 2026 22:03
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