Skip to content

[Bubblewrap] Proxy-only egress does not restrict non-IP socket families (AF_VSOCK) #936

Closed

Description

Relevant area(s)

Linux (Bubblewrap backend)

Brief description of your issue

Bubblewrap's proxy-only egress enforcement (schema 0.8+, added in #931) installs iptables and ip6tables rules that permit only loopback and the translated proxy endpoint, dropping everything else. Those rules filter AF_INET and AF_INET6 only.

An unprivileged workload inside the sandbox can still create AF_VSOCK sockets. On kernels and configurations where a vsock transport is reachable from a non-privileged guest context, this is a path to the host/hypervisor that never traverses the proxy and that no iptables rule can express. The sandbox's stated posture is "the proxy endpoint and nothing else", so a reachable non-IP socket family is a gap in that guarantee rather than an accepted limitation.

The same reasoning applies to any other non-IP address family that is reachable by default; AF_VSOCK is the concrete case identified.

Source: adversarial review of #931 (Medium). Deferred from that PR because the fix is a different enforcement mechanism (seccomp) from the one that PR introduces, not an extension of it.

Steps to reproduce

  1. Run a Bubblewrap sandbox with schema 0.8.0-alpha and network.proxy configured, so proxy-only egress rules are installed.
  2. From inside the sandbox, confirm the IP path is enforced: a direct TCP connect to an arbitrary public address is dropped, while the proxy endpoint is reachable.
  3. From inside the sandbox, create an AF_VSOCK socket (socket(AF_VSOCK, SOCK_STREAM, 0)) and attempt to connect to a host context ID.
  4. Observe that socket creation is permitted and that the attempt is not governed by any egress rule.

Expected behavior

Address families the backend cannot enforce policy over should not be reachable from a proxy-only sandbox. Either deny them with a seccomp filter on socket() for non-required families, or document and verify that the deployment's vsock configuration makes them unreachable. A regression test should attempt a vsock connect and assert it is refused.

Actual behavior

AF_VSOCK socket creation succeeds. Proxy-only egress covers only IPv4 and IPv6, so traffic over a non-IP family bypasses the proxy entirely without violating any installed rule.

Activity

  1. added
    OS-LinuxApplies specifically to Linux hosts or Linux behavior.
    and removed
    Needs-TriageHas not yet been reviewed, classified, and routed.
    on Aug 18, 2026
  2. added
    Needs-TriageHas not yet been reviewed, classified, and routed.
    Priority3Moderate or limited impact; address as capacity permits.
    and removed
    Needs-TriageHas not yet been reviewed, classified, and routed.
    on Aug 18, 2026
  3. added
    Area-Rust-SDKPublic Rust SDK APIs and integration with the MXC execution engine.
    Backend-LXCLinux container isolation implemented with LXC.
    on Aug 18, 2026
  4. github-actions commented on Aug 18, 2026

    @github-actions

    Triage complete.

    Labels applied: Container-Process, Area-Executor-LXC, Area-Build-Rust (in addition to the existing Issue-Bug and OS-Linux).

    Owners assigned: Soham Das (@SohamDas2021) (Linux/Bubblewrap) was already assigned; added @bbonaby for networking/proxy/iptables ownership, as the fix involves enforcing egress at a socket-family level (likely via seccomp in the Rust bwrap backend).

    Needs-Triage has been removed.

    Maintainers: Comment /investigate to check whether this issue or bug is valid against the most current code. Copilot will also produce a report with the changes that will be needed. For a small, unambiguous documentation or test fix, it may also create one draft PR.

    Generated by 🏷️ Issue Triage for #936 · sonnet46 · 20.7 AIC · ⌖ 5.43 AIC · ⊞ 7.5K · ◷

  5. added
    Backend-ProcessContainerWindows ProcessContainer behavior, including BaseContainer and AppContainer isolation tiers.
    and removed
    Backend-ProcessContainerWindows ProcessContainer behavior, including BaseContainer and AppContainer isolation tiers.
    on Sep 14, 2026
  6. SohamDas2021 commented on Sep 14, 2026

    @SohamDas2021
    ContributorAuthor

    Tracked in ADO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-Rust-SDKPublic Rust SDK APIs and integration with the MXC execution engine.Backend-LXCLinux container isolation implemented with LXC.Issue-BugSomething is not working as intended.OS-LinuxApplies specifically to Linux hosts or Linux behavior.Priority3Moderate or limited impact; address as capacity permits.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions