Repository navigation
Fix/native i386 sandox - #130
Merged
Merged
Conversation
1ay1
added a commit
that referenced
this pull request
Nov 16, 2026
- 32-bit kill goes through the broker like the native one. the broker maps an i386 kill onto the native decision by the call's audit arch. - the compat policy is claybin's profiles_i386 as is, plus the same W^X switch and add_socket_families(), instead of a second copy here. - merged-/usr links are found in the posture (sandbox.cpp) and build_policy just applies them. - sandbox_multilib_check is a by-hand target like sandbox_live_check, writes under ~/.cache instead of the cwd, and checks kill too. - purity allows probe.cpp's one netns socket, documented. claybin: native and i386 profiles now allow what git, sqlite, tar and node need (fsync, flock, link, umask...), and x86_audit keeps the two ABIs equal by name.
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
Enable ordinary 32-bit Linux executables to run under Agentty's normal sandbox configuration on x86-64 hosts with multilib support.
This fixes both default ELF interpreter resolution and i386 syscall filtering without disabling sandboxing, seccomp, or W^X protection.
Depends on the companion Claybin PR: [link to Claybin PR].
Root causes
Merged-
/usrloader resolutionOn Arch Linux, the standard loader resolves through:
Binding
/libas a real directory flattens the merged-/usralias. The relative loader symlink then resolves beneath/lib32instead of/usr/lib32, causing ordinarygcc -m32executables to fail with:Seccomp architecture rejection
Using an explicit
/usr/lib32/ld-linux.so.2interpreter gets past that filesystem issue, but the previous Claybin architecture guard killsAUDIT_ARCH_I386syscalls before consulting syscall rules, producingSIGSYSand exit 159.Accepting i386 calls with the native syscall table would be unsafe because the two ABIs use different syscall numbers.
Changes
/usrroot symlinks in the Claybin mount tree./usrmapping for/usr/lib32and Debian-style multilib directories.Mode::Onsandbox execution path.No new setting is required. Compatibility execution remains subject to kernel support and installed runtime libraries.
Security
/or home-directory access is added.mmapand multiplexedsocketcallare denied where their arguments cannot be inspected safely.Verification
Verified on an x86-64 Linux host with multilib support:
agentty 0.9.56.gcc -m32executable using the default ELF interpreter, with no custom linker path, returns 42 inside the sandbox.unsharesyscall terminates both test processes withSIGSYS, exit 159.Commands used:
Full-suite result
1,966 tests passed; one test failed:
rag_eval_guard.The held-out documentation evaluation reports MRR 0.806, below its 0.82 floor, while hit@8 is 1.000. The same score reproduces against the pre-patch documentation checkout using the same built evaluator. Neither the documentation corpus nor retrieval code is changed by this PR.
The evaluation threshold was not relaxed, and the failing test was not excluded.