Repository navigation
Conversation
`start_time_ms` called rustix's `clock_ticks_per_second`, whose auxv initialisation panics when the kernel lacks `PR_GET_AUXV` (added in Linux 6.4) and `/proc/self/auxv` cannot be opened as a fallback. Inside the sandbox network broker that is exactly the situation on RHEL 9 nodes (kernel 5.14), so every mediated connect() panicked the notification handler and was answered EIO, breaking all sandbox egress since 0.1.10. Resolve the tick rate with `sysconf(_SC_CLK_TCK)` instead, degrading to the Linux ABI constant (`USER_HZ` = 100) rather than risking a panic, and drop the rustix dependency from the crate. Add a regression test that reproduces the kernel < 6.4 conditions with a seccomp filter answering `PR_GET_AUXV` with ENOSYS and a Landlock ruleset that denies `/proc/self/auxv` while keeping `/proc/stat` readable. Closes ai-openshell#6069 Signed-off-by: Emilien Macchi <emacchi@redhat.com>
|
@FrostGod please take a look |
|
Independent confirmation of the root cause — and the fix verified locally We hit #6069 on RHEL CoreOS 9.6 (kernel At
From reading rustix 1.1.6: One merge-gate note: "PR Issue Acceptance" is currently red because #6069 carries We will re-run our 5.14-node egress preflight (an allowed host, |
TaylorMutch
left a comment
There was a problem hiding this comment.
Reviewed the fix against #6069. The sysconf lookup removes the panicking auxv initialization from process identity resolution, and the subprocess regression test covers unavailable PR_GET_AUXV plus denied auxv reads. Required checks pass.
Summary
Every mediated
connect()in a sandbox answered EIO on kernels withoutPR_GET_AUXV(Linux < 6.4, e.g. RHEL 9's 5.14).start_time_mscalled rustix'sclock_ticks_per_second, whose auxv initialisation panics on the broker thread whenprctl(PR_GET_AUXV)is missing and/proc/self/auxvis unreadable inside the sandbox. The regression came in with #5251 and first shipped in 0.1.10. The tick rate now comes fromsysconf(_SC_CLK_TCK)with the Linux ABI constant as a fallback, and the rustix dependency is gone from the crate.Related Issue
Closes #6069
Changes
start_time_msresolves clock ticks throughlibc::sysconf(_SC_CLK_TCK), degrading to theUSER_HZconstant (100) instead of panicking; no auxv initialisation remains on the identity pathrustixdependency fromopenshell-binary-identity(the panicking call was its only use)prctl(PR_GET_AUXV)withENOSYSand a Landlock ruleset denying/proc/self/auxv(while keeping/proc/statreadable) must still resolve a start timeRelease Notes
Fixed sandbox egress failing with EIO on kernels older than 6.4, such as RHEL 9 / RHCOS 9.6 nodes. The network broker no longer panics during process-identity resolution, so mediated connects and the policy telemetry they produce work again on those kernels.
Testing
How the fix was verified against the bug:
prctl(PR_GET_AUXV)then/proc/self/auxvfallback and unwrap), the child panics on the same unwrap from the Kubernetes sandbox egress on 0.1.10 fails EIO on kernel < 6.4: every mediated connect() panics the network broker in rustix auxv init (regression from 0.1.9) #6069 stack trace and the test fails. With this change, the same child resolves a start time and passes. The fixture checks that/proc/self/auxvis actually unreadable and reports exercised vs skipped, so it cannot pass vacuously.cargo test -p openshell-binary-identity: 23 tests plus the two fixture halves green, also underRUST_TEST_THREADS=1.transparent_tcpfails on this host identically on cleanorigin/main(rootless podman DNS for the fixture alias), so it is environmental.-D warnings(experimental and perf-harness rows) and anopenshell-servertest-support compile check pass.Checklist