GHSA-xjhv-pp2r-6f82 BoxLite has a Timeout Bypass Vulnerability
SummaryBoxLite is a sandbox service that allows users to create lightweight virtual machines (Boxes) and run OCI containers within them. BoxLite allows users to configure a timeout for services running inside the virtual machine. When the timeout is triggered, BoxLite sends a signal to kill the process. However, instead of using the uncatchable SIGKILL signal, BoxLite uses the catchable SIGALRM signal. Malicious code running inside the sandbox can exploit this vulnerability to continue running after the timeout is triggered, leading to resource exhaustion within the virtual machine and affecting the availability of the BoxLite service.DetailsExecRequest with timeout_ms arrives at Execution service**File:** `guest/src/service/exec/mod.rs` **Function:** `spawn_execution()` (line 315) **Code:****Issue:** Any nonzero `timeout_ms` triggers the timeout watcher. The host expects this to kill the process after the specified duration.Timeout watcher sends SIGALRM instead of SIGKILL**File:** `guest/src/service/exec/timeout.rs` **Function:** `start_timeout_watcher()` (line 13) **Code:****Issue:** The comment on line 21 explicitly states "Kill process with SIGKILL", but line 23 sends `Signal::SIGALRM`. SIGALRM (signal 14) is the POSIX alarm signal and is catchable/ignorable; SIGKILL (signal 9) cannot be caught or ignored. This is a code error — wrong signal constant used.exec_state.kill() passes the signal through unchanged**File:** `guest/src/service/exec/state.rs` **Function:** `kill()` (line 325) **Code:****Issue:** No override of the signal — the wrong signal (`SIGALRM`) is delivered directly to the process.ExecHandle.kill() delivers SIGALRM to the process**File:** `guest/src/service/exec/exec_handle.rs` **Function:** `kill()` (line 335) **Code:****Issue:** Sends SIGALRM (signal 14) to the process. Any process that has registered a custom SIGALRM handler (e.g., via `signal(SIGALRM, handler)`) or set SIGALRM to SIG_IGN will not be terminated.As seen from the code, the developer indicated in the comments that SIGKILL should be sent to kill the timed-out process, but SIGALRM was used in the implementation, resulting in the vulnerability.PoCInstall Boxlite following the official tutorial.Run the following Python script:Sample output:As shown in the output, after catching the SIGALRM signal, the process can continue running, bypassing the timeout restriction.ImpactMalicious code running inside the sandbox can exploit this vulnerability to continue running after the timeout is triggered, leading to resource exhaustion within the virtual machine and affecting the availability of the BoxLite service.ScoreSeverity: Medium, Score: 6.5, rationale as follows:AV:N — Can be triggered by submitting code via the network APIAC:L — No complex exploitation required; catching the signal is sufficient to bypassPR:L — The attacker does not need special privilegesUI:N — The attacker does not need to interact with the victimS:U — This vulnerability only affects the sandbox internals and does not change the scopeC:N/I:N/A:H — This vulnerability only affects availability, not confidentiality or integrityCreditThis vulnerability was discovered by:XlabAI Team of Tencent Xuanwu LabAtuin Automated Vulnerability Discovery EngineCVE and credit are preferred.If there are any questions regarding the vulnerability details, please feel free to reach out to Tencent Xuanwu Lab for further discussion by emailing xlabai@tencent.com.NoteNote that the organization follows the industry-standard **90+30 disclosure policy** (Reference: https://googleprojectzero.blogspot.com/p/vulnerability-disclosure-policy.html). This means that the organization reserves the right to disclose the details of the vulnerability 30 days after the fix has been implemented.
CVSS v3.1 score: 6.5