Repository navigation
test(sandbox): prove the none box's seal on a packet socket, not an inet one - #3268
Merged
Merged
Conversation
…net one boxes_lack_cap_net_raw expected a none box's inet raw socket to fail with EAFNOSUPPORT, the seal's refusal. That was the none seal of T8, unix only. T64 admitted inet to it so a none box can use its own loopback, and since then the kernel's capability check answers first: EPERM, as in an open box. The test never ran where it would have said so (the hosted runner restricts unprivileged user namespaces and it self-skips), and fails on every host where it runs (gominimal/inbox#1148). The probe now also opens a packet socket. An open box's seal admits the packet family, so the missing CAP_NET_RAW refuses it with EPERM; a none box's seal refuses the family itself with EAFNOSUPPORT before the capability check, which is the seal-and-credentials-in-one-launch fact the test exists for. The inet raw socket reads EPERM in both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 49 minutes for your next included review. View limit details
|
bryan-minimal
marked this pull request as ready for review
November 11, 2026 05:43
Contributor
|
Approved: no findings at Nothing to do. Clobber: none. |
norrietaylor
approved these changes
Nov 11, 2026
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.
Fixes gominimal/inbox#1148.
What
boxes_lack_cap_net_raw(crates/sandbox/tests/caps_root_integration.rs) expected a none box'ssocket(AF_INET, SOCK_RAW)to fail withEAFNOSUPPORT, the seal's refusal. That was the none seal of T8 (#1692), unix only. T64 (#1780) admitted the inet families to it so a none box can use its own loopback, and since then the kernel'sCAP_NET_RAWcheck answers first:EPERM, exactly as in an open box. The test never ran where it would have said so (the hosted runner restricts unprivileged user namespaces, and the test self-skips there) and fails on every host where it does run.The probe now also opens
socket(AF_PACKET, SOCK_RAW, 0):EPERMEPERMEPERMEAFNOSUPPORTThe none box's packet answer is the fact the test exists for: seal and credentials hold together in the one launch closure that applies both. The doc comment on the test says the same.
What this does not do
The
testslane still only exercises this on a runner that allows unprivileged user namespaces, so on GitHub it self-skips as before. Running the sandbox crate's root-integration binary in theminimald-root-integrationjob (where the sysctl is relaxed) is a separate change to the workflow; the issue's suggestion stands.Tests
🤖 Generated with Claude Code