Skip to content

[linux][P1][security] network: TSI exposes unpublished guest listeners on host 0.0.0.0 #371

Closed

Description

@CharlieZiChen

Summary

On Linux/KVM (a3s-box v3.2.5 / Box revision c9a45455), TSI exposes a guest listener on the host wildcard address even when no host port was declared. A guest listen() becomes LISTEN *:<same-port> on the host and is reachable from the host and LAN.

Severity: P1 (network isolation/security boundary violation)

Acceptance case: B13 TSI host-exposure probe / B17 relay-misroute probe

Local tracking: N2

Expected

Only an explicit -p host:guest mapping should bind a host port. An unpublished guest listener must remain inside the MicroVM network boundary and must not be reachable from the host LAN.

Actual

The negative control behaves correctly, but default TSI does not:

--network none host listener count = 0

TSI default, no -p mapping:
LISTEN 0 1 *:21101 *:* users:(("libkrun VM",pid=...,fd=...))
LISTEN 0 1 *:21102 *:* users:(("libkrun VM",pid=...,fd=...))
LISTEN 0 1 *:21103 *:* users:(("libkrun VM",pid=...,fd=...))

The guest service was started without a host-port declaration. The same behavior creates host-port collisions, including the fixed R17 port collision observed with an existing docker-proxy listener.

Repro

export A3S_HOME="$(mktemp -d /var/tmp/a3s-n2.XXXXXX)"
export A3S_BOX=/path/to/Box/src/target/release/a3s-box
export A3S_BOX_TEST_ALPINE_TAR=/path/to/evidence/images/alpine-oci.tar
GUEST_PORT=21101

a3s-box load -i "$A3S_BOX_TEST_ALPINE_TAR" -t alpine:defect-n2
a3s-box run -d --name tsi alpine:defect-n2 -- \
  /bin/sh -c "while true; do nc -l -p $GUEST_PORT -e /bin/cat; done"
ss -ltnp | grep ":$GUEST_PORT "
# Actual: host LISTEN *:21101 owned by libkrun VM, without -p.

a3s-box rm -f tsi

The control case uses the same guest listener under --network none; it produces no host listener.

Repro rate: 3/3 independent dynamic-port runs on 2026-09-14.

Environment

Item Value
OS Ubuntu 24.04 x86_64
Kernel Linux 6.17
Hypervisor KVM / MicroVM with TSI
Binary a3s-box 3.2.5 release
Commit c9a45455ff59d53921e3abedffdfefd49eb0afa9
Binary SHA-256 b9783edb4881bbbcd968c10f539c746ac54bf5f05930309588cbe21db9eaa4b9
Lane Linux user lane; separate A3S_HOME; dynamic guest ports 21101–21103

Evidence

  • evidence/w10/followup/reconfirm/batch1/N2-1/confirm2.log
  • evidence/w10/followup/reconfirm/batch1/N2-2/confirm2.log
  • evidence/w10/followup/reconfirm/batch1/N2-3/confirm2.log
  • evidence/w10/followup/b13/summary.md
  • evidence/w10/followup/b17/tsi-host-exposure-probe.log
  • evidence/w10/followup/b17/relay-misroute-probe.log

Regression coverage

  1. Test default TSI, bridge, and --network none separately.
  2. Verify loopback, host primary address, and LAN address reachability.
  3. Verify explicit -p still works while unpublished listeners do not appear in ss -ltnp.
  4. Repeat with dynamic ports and with a deliberately occupied host port.

Activity

  1. changed the title [-][linux] network: TSI exposes unpublished guest listeners on host 0.0.0.0[/-] [+][linux][P1][security] network: TSI exposes unpublished guest listeners on host 0.0.0.0[/+] on Sep 14, 2026
  2. ZhiXiao-Lin commented on Sep 14, 2026

    @ZhiXiao-Lin

    Fixed by #377 (squash 52d175a). Default TSI unpublished listeners no longer auto-publish onto host 0.0.0.0; shim always passes an explicit krun_set_port_map allowlist. Follow-up for in-guest listen and scale relay is #370 / #378 (TSI -EPERM native fallback), not a reopen of this isolation bug.

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