8000 vivarium: --offline leaks IPv6 to the internet, and differs from a sandboxed build · Issue #1094 · nixidae/nixidae · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

vivarium: --offline leaks IPv6 to the internet, and differs from a sandboxed build #1094

Closed

Description

@Lillecarl

--offline leaves a guest a way off the host over IPv6, and a sandboxed build and an --offline run differ in what the uplink gives. The offline run is how a sandboxed failure is debugged, and how an air-gapped test is checked interactively, so both matter.

Measured 2026-10-26, one NixOS guest, nixidae 39731a2, the same test as a build (sg1-n3) and as driver --offline (dynhetz):

build (sandbox) --offline
IPv4 uplink 10.0.2.15/24 via 10.0.2.2 same
IPv6 on the uplink link-local only, default via fe80::1 the host's global prefix, copied: 2a01:4f9:3071:11d7::2/128 and SLAAC addresses in it
TCP to 1.1.1.1:80 (no route off the host) blocked, times out
TCP to [2606:4700:4700::1111]:80 (no route off the host) connects
ping 10.0.2.2 no reply replies

Causes:

  • --offline passes passt --outbound 127.0.0.1, which binds IPv4 only. IPv6 leaves through the host.
  • Outside the sandbox passt has template interfaces, so it copies the host's IPv6 addresses and routes. In the sandbox it has none and uses local mode.
  • ICMP: passt answers a guest's ping with an unprivileged ping socket. The host allows them (ping_group_range 0 2147483647); the sandbox does not (65534 65534, and writing it is denied, measured), so a sandboxed ping to the gateway gets no reply.

A direction: run an --offline session in a private network namespace with only lo, as the build sandbox is. passt then takes local mode in both, ICMP fails in both, and nothing leaves the host in either family. vivarium ctl works over its unix socket; host port forwards would then be inside that namespace.

Assisted-By: Claude Opus 5.5

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0