Skip to content

Commit de00bfc

Browse files
committed
fix(sandbox): do not gate launch confirmation on seccomp cancellation
The confirmation evidence check required seccomp.cancellation (WAIT_KILLABLE_RECV, Linux 5.19+). On kernels older than 5.19 the sandbox falls back to a plain listener and reports cancellation=false, so requiring it stopped the supervisor from confirming the sandbox there ("confirmation failed: sandbox confirmation evidence is incomplete or mismatched"). Cancellation is a robustness property, not a containment prerequisite: containment still holds via the listener itself. Drop it from the launch gate and update the conformance test to assert rejection on a containment-critical primitive instead. Signed-off-by: Akram <akram.benaissi@gmail.com>
1 parent b07efbd commit de00bfc

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎crates/openshell-isolation-interface/src/contract.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,11 @@ impl SandboxConfirmEvidence {
562562
&& self.seccomp.proc_fd_identity
563563
&& self.seccomp.task_memory_read
564564
&& self.seccomp.task_memory_write
565-
&& self.seccomp.cancellation
565+
// `cancellation` (seccomp WAIT_KILLABLE_RECV, Linux 5.19+) is a
566+
// robustness property, not a containment prerequisite: on older
567+
// kernels (e.g. RHEL 9.x / 5.14) the sandbox falls back to a plain
568+
// listener and reports cancellation=false. Containment still holds
569+
// via the listener itself, so launch is not gated on cancellation.
566570
&& self.landlock_abi >= 3
567571
&& self.landlock_allow_deny
568572
&& self.udp_dns_round_trip

‎crates/openshell-isolation-interface/tests/backend_conformance.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,11 @@ async fn one_driver_runs_both_backends() {
538538
#[test]
539539
fn confirmation_constructor_rejects_incomplete_evidence() {
540540
let mut evidence = confirmation_evidence();
541-
evidence.seccomp.cancellation = false;
541+
// A missing containment-critical primitive (the notification listener
542+
// itself) must be rejected. `cancellation` is intentionally NOT in this set:
543+
// it reflects WAIT_KILLABLE_RECV (Linux 5.19+) and is unavailable on older
544+
// kernels, where the sandbox degrades to a plain listener.
545+
evidence.seccomp.new_listener = false;
542546
let result = ConfirmedBoundary::try_new(
543547
Box::new(MockReady::<Primary> { _k: PhantomData }),
544548
evidence,

0 commit comments

Comments
 (0)