fix: add clock_gettime and clock_nanosleep to VMM seccomp allowlist#18
Open
itpilotdk wants to merge 1 commit into
Open
fix: add clock_gettime and clock_nanosleep to VMM seccomp allowlist#18itpilotdk wants to merge 1 commit into
itpilotdk wants to merge 1 commit into
Conversation
SYS_clock_gettime was missing from the seccomp allowlist, causing sandbox-runner to panic with EPERM on native Linux kernels. Rust >= 1.74 changed Instant::now() on Linux to use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC. Since clock_gettime was not in the allowlist at all, the seccomp filter returned EPERM, which Rust's unwrap() turned into a panic. This only manifested on native Linux kernels (e.g. bare metal, KVM/Proxmox VMs). WSL2 does not enforce prctl(PR_SET_SECCOMP) argument filters the same way, which is why it worked there. Fixes: sandbox-runner panics with 'Operation not permitted' on native Linux when starting microVM."
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.
SYS_clock_gettime was missing from the seccomp allowlist, causing sandbox-runner to panic with EPERM on native Linux kernels.
Rust >= 1.74 changed Instant::now() on Linux to use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC. Since clock_gettime was not in the allowlist at all, the seccomp filter returned EPERM, which Rust's unwrap() turned into a panic.
This only manifested on native Linux kernels (e.g. bare metal, KVM/Proxmox VMs). WSL2 does not enforce prctl(PR_SET_SECCOMP) argument filters the same way, which is why it worked there.
Fixes: sandbox-runner panics with 'Operation not permitted' on native Linux when starting microVM."
Example error (Hetzner Ubuntu 24.04.2 LTS, Docker version 28.2.2, build e6534b4)