feat(sandbox): enforce Linux network isolation - #11659
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Previous Review Summaries (3 snapshots, latest commit 10d4308)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 10d4308)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (2 files)
Previous review (commit 2a02e75)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (1 file)
Previous review (commit 7f4702b)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Fix these issues in Kilo Cloud Files Reviewed (6 files)
Reviewed by gpt-5.4-20260305 · Input: 52.4K · Output: 4.3K · Cached: 209.9K Review guidance: REVIEW.md from base branch |
Linux network sandbox red-team conclusionI completed adversarial validation of the Linux network sandbox using the packaged Linux ARM64 VSIX from implementation commit The validation combined real package integration tests, controlled tests against a live contained host-side broker, and a broader ten-phase adversarial run. All listeners and canaries were disposable and confined to Confirmed behavior
These results provide strong evidence that the PR enforces its stated boundary: sandbox-created TCP and UDP sockets cannot reach services in the VM's host network namespace when network restriction is enabled. Unix socket boundaryControlled testing with the broker confirmed that Unix socket behavior must remain a separate capability boundary:
The pathname and passed-descriptor cases are delegated authority, not failures of Fixture caveatThe later ten-phase adversarial run started after the prepared broker process had exited. Its repeated This fixture-lifecycle problem does not invalidate the earlier controlled live-broker checks or the real integration tests, but it does invalidate the broad run's claims that pathname Unix delegation was blocked or that zero broker events independently proved every direct connection case. The following findings from the broad run remain valid because they do not depend on broker liveness:
Remaining limitations
ConclusionThe Linux implementation passes the intended direct IP-network boundary for TCP, UDP, IPv4, IPv6, descendants, and common namespace recovery attempts. No direct IP breakout or namespace escape was found. The result supports this PR's stated scope while preserving explicit separation between IP namespace isolation and delegated authority through filesystem-visible Unix sockets. |
Linux network sandbox red-team attack matrixThis matrix records the packaged-artifact controls, automated Linux integration coverage, and the broader ten-phase adversarial run for PR #11659. Runtime behavior was tested from implementation commit Classification used below:
Packaged artifact and live-broker controlsThese checks used the installed Linux ARM64 VSIX with the contained broker confirmed listening immediately before the sandboxed operation.
The last three rows do not show a sandbox-created IP socket crossing Automated real Linux integration coverageThese cases execute the actual Bubblewrap backend and process spawner on Linux rather than only inspecting generated arguments.
Every deny-mode integration case now explicitly asserts that the host supports the required network namespace. IPv6 is a separate capability-gated case, so hosts with IPv6 disabled do not fail before exercising the IPv4 boundary. Broader ten-phase adversarial runThe contained broker process exited before this run began. Rows that depended on receiving a broker response are marked
Overall resultNo direct IP breakout or namespace escape was found. The live-broker controls and real integration tests validate deny-mode isolation for sandbox-created TCP and UDP sockets. Internal loopback remains intentionally usable. Pathname Unix sockets and descriptors delegated through them remain a confirmed separate authority channel under #11650. The broad run adds useful namespace and capability evidence, but its dead-broker rows are deliberately not counted as independent passes. |
|
Moderate, Functional: Please derive the configured network mode in |
…ndbox feat(sandbox): enforce Linux network isolation
The Linux sandbox network setting currently blocks classified in-process HTTP tools but leaves spawned commands in the host network namespace. Shell commands and their descendants can therefore retain TCP and UDP access even when network restriction is enabled.
This change applies the scoped network profile to Bubblewrap launches. Deny mode creates a separate network namespace, while allow mode keeps host networking. The backend probes network namespace support separately from filesystem namespace support and fails explicit restricted launches closed when the host cannot provide the required capability. Unsupported proxy and host-allowlist profiles continue to fail closed.
Linux deny mode blocks host TCP and UDP over IPv4 and IPv6 while preserving loopback communication between processes inside the same sandbox namespace. This matches the macOS outbound-network guarantee, although Linux namespace isolation also prevents the host from initiating connections into the sandbox. Pathname Unix socket authority remains a separate boundary tracked in #11650.
Closes #11651.