Skip to content

How does wb-proxyd know which VM and name a stream belongs to, when wb-netd may be compromised?

Decided 2026-10-08: A. The decision is in the I68I68 (closed): wb-proxyd must bind stream identity to the connection, not to wb-netd's tagsFound in the security review of #65 (X23-sandboxed-daemons result). comment that starts Decision (2026-10-08):. The per-VM hand-off socket, the re-check and the narrowing header were decided on I68I68 (closed): wb-proxyd must bind stream identity to the connection, not to wb-netd's tagsFound in the security review of #65 (X23-sandboxed-daemons result). on 2026-10-04. This brief asked about how the spec fills them in. Source: I68I68 (closed): wb-proxyd must bind stream identity to the connection, not to wb-netd's tagsFound in the security review of #65 (X23-sandboxed-daemons result)., from the security review of X23-sandboxed-daemonsX23-sandboxed-daemons: Self-sandboxed Go daemons on macOSCan wb-netd, wb-proxyd and wb-hostd confine themselves at start with a sandbox profile, as S04-architecture says, while the Go runtime, inherited descriptors, and Keychain and Secure Enclave access in wb-proxyd keep w…. Changes S07-05-stream-hand-offS07-05-stream-hand-off: Stream Hand-offHow wb-netd hands each stream to wb-proxyd, and the checks that keep a compromised wb-netd from widening what a stream may reach., S07-07-hosts-and-modesS07-07-hosts-and-modes: Hosts and ModesHow wb-proxyd binds a stream to its name, which upstream addresses it refuses, and the inspect, pass and audit modes. (“Name binding”), S07-02-packet-pathS07-02-packet-path: Packet PathHow wb-netd carries the guest's frames: the packet transport, the stack, the link filter, its caps, addressing, the MTU and connections. (“Events and rate limits”), S04-02-vm-providerS04-02-vm-provider: VM Provider and StreamsHow wb-vmd hands guest connections and the NIC endpoint to other processes, the fixed device set of a VM, and where wb-proxyd takes a stream's identity from. and S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq…. Follow-ups: I172I172 (closed): Measure the hand-off socket ordering and no-silent-drop properties on each host platformFollow-up from the code review of #170 (#68)., I173I173 (closed): Measure the delay of delivering an effective policy change to wb-proxyd before wb-netdFollow-up from the code review of #170 (#68)..

guests, untrustedVM AVM Bwb-netd Amay be compromisedwb-netd Bwb-proxydVM from the socketname from its own copywb-hostdsocket Asocket Bends, named”this stream is VM B’s”: no socket for it

Figure 1. One hand-off socket per VM. wb-hostd creates it and tells wb-proxyd which VM it belongs to, so wb-proxyd never asks wb-netd. The red arrow shows what the X23-sandboxed-daemonsX23-sandboxed-daemons: Self-sandboxed Go daemons on macOSCan wb-netd, wb-proxyd and wb-hostd confine themselves at start with a sandbox profile, as S04-architecture says, while the Go runtime, inherited descriptors, and Keychain and Secure Enclave access in wb-proxyd keep w… spike allowed, where a header that wb-netd wrote named the VM.

These are ways to fill in “its own copy of the DNS mapping”. Each keeps the per-VM socket you decided, and that socket keeps one VM’s streams away from another VM’s policy and credentials.

Before each DNS answer with a synthetic address leaves, wb-netd sends the name and address on the VM’s socket. wb-proxyd keeps the pair only if the name is well formed and allowed by the VM’s policy, and the address isn’t held for another name. A stream message holds only the address, and wb-proxyd looks the name up in its copy.

B. Name in the stream, checked against policy

Section titled “B. Name in the stream, checked against policy”

The stream message holds the name. wb-proxyd checks it against the VM’s policy and then the SNI or Host, and doesn’t keep a table.

wb-netd asks wb-proxyd for each synthetic address, and the pool moves into wb-proxyd.

RequirementA. Name reportsB. Name in streamC. Pool in wb-proxyd
SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another. one project can’t reach another’s grantsVM from the socketVM from the socketVM from the socket
SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential. credentials only on the host sidebindings of the socket’s VMbindings of the socket’s VMbindings of the socket’s VM
SEC05-default-denySEC05-default-deny: Default-deny egress, enforced on the hostOnly allowlisted hostnames are reachable. only allowlisted names reachablechecked twice, with a copychecked twice, no copychecked twice
NFR01-startupNFR01-startup: StartupGoals: a warm VM reaches the Claude prompt in about 4 s and a suspended VM in about 7 s, and no start takes more than 10 s (p95), excluding first-time project setup and the first boot after a host restart. fast start and resumeno round tripno round tripround trip per answer

These follow from the reviews of PR170PR170 (merged): docs(spec): bind wb-proxyd stream identity to the hand-off socketWrites the #68 decision into the specs: wb-proxyd takes a stream's VM from the per-VM hand-off socket that wb-hostd creates and labels, re-checks the name against its own copy of the name mapping, the VM's effective… and from the supervision work in I48I48 (closed): S04-architecture: process supervision, failure, version skew and host resource limitsS04-architecture names the processes but not how they are supervised, what happens when one fails, or how they are upgraded:. Approving the brief approves them too.

  • Transport per platform. SOCK_SEQPACKET on Linux and SOCK_DGRAM on macOS, with the ordering property I172I172 (closed): Measure the hand-off socket ordering and no-silent-drop properties on each host platformFollow-up from the code review of #170 (#68). measures.
  • A new socket at each restart. wb-hostd makes a new hand-off socket at each start and restore, and when it restarts that VM’s wb-netd. A restart of the shared wb-proxyd gives every running VM a new socket. A restart keeps the generation, and that equal generation replaces the old socket. wb-proxyd gets its end and acknowledges it before wb-netd gets its end and before the VM runs.
  • Replay. On every new socket, wb-netd first sends a name report for each live entry of its mapping. That rebuilds wb-proxyd’s copy after a wb-proxyd restart, and matches the kept copy after a wb-netd restart, whose mapping wb-hostd kept (I48I48 (closed): S04-architecture: process supervision, failure, version skew and host resource limitsS04-architecture names the processes but not how they are supervised, what happens when one fails, or how they are upgraded:). Messages are sent, retried and decided in order. A replayed or new report with a malformed name or an address outside the range ends that wb-netd, as a malformed accounting record does.
  • Copy lifetime. The copy and wb-netd’s mapping are cleared only at a start that isn’t a restore. Releases remove everything else, so a VM saved while idle keeps its guest’s cached answers.
  • Address reuse fails closed. A report for an address the copy holds for another name removes the old entry too and closes streams to it (address-conflict). Entries leave the copy only when wb-netd releases them, so there is one clock, wb-netd’s.
  • Wildcard budget in both layers. wb-proxyd counts the distinct names it accepted under wildcards, per VM and active period, and refuses over the budget. Each name goes to wb-hostd as an accounting record, which keeps the set across a wb-proxyd restart. Replays aren’t counted twice.
  • Bounds. Per-socket caps on open streams and undecided messages, a 4 KiB message limit, refusal of truncated messages and cut control data, and the new rules in the rate-limited classes.
  • Policy order. Every change to the effective policy is applied and acknowledged by wb-proxyd before wb-netd gets it. Without the acknowledgment, wb-netd gets narrowing changes only.
Details and glossary

What a compromised wb-netd can still do. It sees every packet from its own VM and can break that VM’s traffic. Under option A it can’t give a stream a name its VM’s policy doesn’t allow, and it can’t reach another VM’s socket, because wb-hostd passed it only its own end. Each start, restore and daemon restart gets a new socket, and wb-proxyd closes the old one.

Why the label only narrows. Once X14-flow-attributionX14-flow-attribution: Guest flow attributionA Network Extension transparent proxy in a macOS guest (S13-guest-confinement): can it be approved during the image build without MDM? delivers labels, a stream message also holds the program and user the guest reported. Guest root can forge it (T06-forged-labelsT06-forged-labels: Forged program labels after guest rootAfter a guest root escalation, forged program identities in the guest confinement layer (S13-guest-confinement).). So a rule that uses it only takes access away.

Glossary

  • Synthetic address: the made-up address in 198.18.0.0/15 that wb-netd answers a DNS query with. The guest never learns the real address.
  • Socketpair: two connected sockets with no file path, so only the processes that are handed an end can use them.
  • SCM_RIGHTS: the way one process sends an open socket to another over a Unix socket.
  • Generation: a number that names one run of a VM. Each restore starts a new one, and messages from an older one are refused.
  • SNI: the host name a TLS client sends in the clear when it connects.