-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(sandbox): support kernels < 5.19 via seccomp WAIT_KILLABLE_RECV fallback #3420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
e16cee2
7b90174
2370e50
285085e
7255941
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,6 +146,11 @@ struct QualificationReport { | |
| tcp_allow_round_trip: bool, | ||
| tcp_deny_round_trip: bool, | ||
| wait_killable_recv: bool, | ||
| /// Selected seccomp listener cancellation mode: `killable` (>= 5.19) or | ||
| /// `legacy_read_only` (< 5.19, broker output writes disabled). | ||
| seccomp_listener_mode: &'static str, | ||
| /// Whether the broker disables task-memory output writes (legacy mode). | ||
| task_memory_writes_disabled: bool, | ||
| } | ||
|
|
||
| #[cfg(target_os = "linux")] | ||
|
|
@@ -237,6 +242,12 @@ fn qualify_runtime() -> Result<(openshell_sandbox::RuntimeQualification, Qualifi | |
| tcp_allow_round_trip: true, | ||
| tcp_deny_round_trip: true, | ||
| wait_killable_recv: notification.wait_killable_recv, | ||
| seccomp_listener_mode: if notification.wait_killable_recv { | ||
| "killable" | ||
| } else { | ||
| "legacy_read_only" | ||
| }, | ||
| task_memory_writes_disabled: !notification.wait_killable_recv, | ||
| }; | ||
| let qualification = openshell_sandbox::RuntimeQualification { | ||
| seccomp: openshell_isolation_interface::contract::SeccompEvidence { | ||
|
|
@@ -249,6 +260,9 @@ fn qualify_runtime() -> Result<(openshell_sandbox::RuntimeQualification, Qualifi | |
| task_memory_read: notification.task_memory_copy(), | ||
| task_memory_write: notification.task_memory_copy(), | ||
| cancellation: notification.wait_killable_recv, | ||
| // Legacy plain listener (< 5.19) disables broker output writes; | ||
| // satisfies the `cancellation || writes_disabled` launch invariant. | ||
| task_memory_writes_disabled: !notification.wait_killable_recv, | ||
|
Comment on lines
262
to
+265
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Under which conditions would
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @elezar you're right: today Instead of dropping the field, I'd make it a real independent attestation. At qualification the sandbox installs a I can fix it in this PR, or in a follow-up PR if you'd rather land the current change first. Since this touches the cancellation-safety contract you reviewed: @mrunalp @johntmyers, does the direction work for you? The alternative is collapsing to a single |
||
| }, | ||
| landlock_abi, | ||
| landlock_allow_deny: true, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.