Skip to content

What happens to one VM's hand-off socket, from its creation to its end?

Decided 2026-11-11: A. The decision is in the I754I754 (closed): S07-05-stream-hand-off and S04: settle the hand-off contract end to end (descriptor passing, acks, identity, close, restarts, audit)The hand-off of sockets and streams between host processes keeps getting patched one review at a time: comment that starts Decision (2026-11-11): A. Source: I754I754 (closed): S07-05-stream-hand-off and S04: settle the hand-off contract end to end (descriptor passing, acks, identity, close, restarts, audit)The hand-off of sockets and streams between host processes keeps getting patched one review at a time:. Adds S04-12-descriptor-passingS04-12-descriptor-passing: Passing DescriptorsHow one host process passes an open socket to another: who holds it when, how the receiver shows it holds it, when the sender closes its copy, and what a lost or bad acknowledgment does., S07-20-handoff-socketsS07-20-handoff-sockets: Hand-off SocketsThe life of one VM's hand-off socket: its identity, the acknowledgments of both ends, how it closes, who a failure is charged to, what each restart does to it, and which of its decisions reach the audit log. and S07-21-vm-endS07-21-vm-end: A VM's End in wb-proxydHow wb-hostd ends a VM's hand-off sockets in the one wb-proxyd, and how the VM's last event records reach its stop record without one VM's stop or backlog taking the other VM's network down., and 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-06-name-mappingS07-06-name-mapping: Name MappingHow wb-proxyd keeps its own checked copy of the names wb-netd gave synthetic addresses: name reports, releases, replay, lifetime, the second count of the wildcard budget, and the copy wb-hostd keeps., S04-07-supervisionS04-07-supervision: SupervisionWho starts and restarts each host process, what happens when wb-hostd stops or the bundle is upgraded, and daemon outages., S04-08-records-and-boundsS04-08-records-and-bounds: Records, Versions and BoundsThe records daemons send wb-hostd, the build version rules between processes, the bounds on host work a guest can cause, and logs., S04-09-netd-startS04-09-netd-start: Starting `wb-netd`How wb-hostd starts and stops each VM's wb-netd, what the program inherits, its profile, and what it does before its start message., 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., S09-11-auditS09-11-audit: AuditWhat the audit log records, the budgets that bound it, and what happens when the log can't be written. and T14-shared-proxydT14-shared-proxyd: One proxy process serves both VMsOne wb-proxyd serves the work VM and the isolated VM (S04-architecture, "Processes").. It builds on the decisions of I728I728 (closed): Hand-off socket contract of S07-20: socket number, HandoffSocketHeld, states, close reports, and a VM's endBuilds the hand-off socket contract of S07-20-handoff-sockets and the end exchange of S07-21-vm-end (#754, PR #758) in one change, before #480. and I729I729 (closed): wb-netd can't acknowledge that it holds its end of the hand-off socketFollow-up from the security review of #727 (F2), for #637. (2026-11-10), I571I571 (closed): egress contract: HandoffSocketClosed rule for a StreamReset that can't be sentPR #570 (#491) added a rule to S07-05-stream-hand-off, "Resets": when a StreamReset send fails (ENOBUFS or past its deadline), wb-proxyd closes the VM's hand-off socket before the stream's socket, and wb-netd resets…’s triage (2026-11-10), I576I576 (closed): wb-proxyd: one VM's failed hand-off socket ends the control channel for every VMIn wb-proxyd's hand-off receiver (#492, PR #574), a failure on one VM's new hand-off socket ends the whole control channel, and with it every VM's sockets and streams. (2026-11-07) and I512I512 (closed): wb-proxyd: the program, its confinement and start, hand-off sockets per VM, and restartsPackage M3.12 of docs/implementation-plan.md, part 3 of 4 (M3.12c)., decision 4.

wb-hostdnumbers each socketwb-netd Aanswers when held (new)wb-netd Bwb-proxydanswers each socketreports a closed oneanswers a VM stop1. end, socket n2. after the ack: the other endstreams on socket Asocket B goes onclosed n, with a rule

Figure 1. One VM’s hand-off socket, with the new number and acknowledgments. The red arrow is the report option A adds: today wb-proxyd closes a socket for an unsent reset or a peer that closed its end without telling wb-hostd. S07-20-handoff-socketsS07-20-handoff-sockets: Hand-off SocketsThe life of one VM's hand-off socket: its identity, the acknowledgments of both ends, how it closes, who a failure is charged to, what each restart does to it, and which of its decisions reach the audit log. has the full sequence.

These are what a failure on a VM’s hand-off socket does once wb-proxyd has accepted it: wb-netd closed its end, a receive failed, the version record couldn’t be sent, or a StreamReset couldn’t be sent. A fault in wb-hostd’s own message still ends the control channel in each option, as you decided in I576I576 (closed): wb-proxyd: one VM's failed hand-off socket ends the control channel for every VMIn wb-proxyd's hand-off receiver (#492, PR #574), a failure on one VM's new hand-off socket ends the whole control channel, and with it every VM's sockets and streams..

A. Close that socket, report it, end that wb-netd (chosen)

Section titled “A. Close that socket, report it, end that wb-netd (chosen)”

wb-proxyd closes the socket and its streams and sends one HandoffSocketClosed with the rule. wb-hostd ends that VM’s wb-netd and counts the exit toward its restart limit. Before V1-M6-release-gateV1-M6-release-gate: Release gateThe Seatbelt profiles of wb-hostd and the sessions, confinement self-checks, warm start and suspend, the full conformance suite and benchmarks, packaging and upgrades., that stops the VM.

C. Close that socket only, tell no one (rejected)

Section titled “C. Close that socket only, tell no one (rejected)”

What the code does today for an unsent reset and a closed peer. The VM keeps running, but its traffic doesn’t reach wb-proxyd.

The case for B. It is the smallest rule: any trouble on the control side ends wb-proxyd, and the supervisor restarts it. Each VM then gets a new socket, so no state is kept past a fault, and there is nothing to number or match. Until V1-M6-release-gateV1-M6-release-gate: Release gateThe Seatbelt profiles of wb-hostd and the sessions, confinement self-checks, warm start and suspend, the full conformance suite and benchmarks, packaging and upgrades. there are no restarts, so A and B both stop VMs. A only stops fewer of them.

Confidence: high. The reviews found failures that come from wb-proxyd or the host and would have charged a wb-netd: an ack-timeout, a receive that fails with an error, and a version record that can’t be sent. S07-20-handoff-socketsS07-20-handoff-sockets: Hand-off SocketsThe life of one VM's hand-off socket: its identity, the acknowledgments of both ends, how it closes, who a failure is charged to, what each restart does to it, and which of its decisions reach the audit log. (“Who a failure is charged to”) now charges these to wb-proxyd. A StreamReset that wb-netd refuses is a bug in wb-proxyd too.

RequirementA. Report, end wb-netdB. End wb-proxydC. Close silently
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
SEC10-auditSEC10-audit: AuditEvery egress decision, approval, and returned change is recorded on the host in a persisted log the guest cannot alter. every egress decision recorded on the hostrule in the recordexit recordedno record
SEC13-bounded-resourcesSEC13-bounded-resources: Bounded resourcesCPU, memory and disk of each VM are capped. limits per VMone VM paysboth VMs payone VM pays
T14-shared-proxydT14-shared-proxyd: One proxy process serves both VMsOne wb-proxyd serves the work VM and the isolated VM (S04-architecture, "Processes"). one VM’s fault in the shared proxycontainedspreadscontained

Approving the brief approves these too.

Details and glossary

Why the number. A wb-netd restart gives a VM a new socket in the same generation. Without a number, a late notice about the old socket can end the new wb-netd, or fail its start with a false cause (I728I728 (closed): Hand-off socket contract of S07-20: socket number, HandoffSocketHeld, states, close reports, and a VM's endBuilds the hand-off socket contract of S07-20-handoff-sockets and the end exchange of S07-21-vm-end (#754, PR #758) in one change, before #480.).

Why the strict side for an unsent reset. A guest that stops reading while wb-netd lags can fill the socket, so it can cause one. Counting the restart keeps a guest from looping it for free (I571I571 (closed): egress contract: HandoffSocketClosed rule for a StreamReset that can't be sentPR #570 (#491) added a rule to S07-05-stream-hand-off, "Resets": when a StreamReset send fails (ENOBUFS or past its deadline), wb-proxyd closes the VM's hand-off socket before the stream's socket, and wb-netd resets…’s triage).

Glossary

  • Hand-off socket: the socketpair that carries one VM’s streams and name reports from its wb-netd to wb-proxyd.
  • SCM_RIGHTS: the way one process sends an open socket to another over a Unix socket.
  • Generation: a number for one run of a VM. Each start or restore raises it.
  • Acknowledgment: a message from the receiver that says it holds what it was sent.