# Security

## Reporting a Vulnerability

Report vulnerabilities privately through
[GitHub Security Advisories](https://github.com/gmitch215/gmux/security/advisories/new), not in
public issues. Include the gmux version, the host (Cloudflare Free, Paid, or self-hosted workerd),
and the steps that reproduce it.

## Trust Model

A gmux machine is one Linux kernel and its processes inside one Durable Object. The kernel and every
process except a forked child share one WebAssembly linear memory, and WebAssembly gives no
protection inside a memory, so gmux enforces isolation itself:

- **Root is trusted with the machine.** A process with effective uid 0 can read and write the
  kernel's memory and every other process's.
- **A non-root process runs in a WebAssembly memory of its own.** An exec that leaves the process
  with an effective uid other than 0 (a fork, a vfork, a `$(...)` or a pipeline command of a
  non-root shell) gets a memory of its own and the plain build of its program, so no load or store
  of it reaches the kernel or another process. A setuid-root program run by a non-root user is root
  after the exec and keeps the shared memory. Root can write 0 to `kernel.gmux_own_exec`, which
  sends later non-root execs back to the machine's shared memory, where the kernel keeps an owner
  for every page (a process's tag for its private pages, a region's tag for a shared mapping, and
  for each process the regions it maps and whether it may write them) and the process runs a build
  of its program that checks every load and store against that table, ends with `SIGSEGV` on a
  refused one and cannot run a program that has no such build; the kernel refuses its syscall
  buffers outside its own pages and regions with `EFAULT`. That checked build is kept to compare
  against, and a registered guarded build is picked only for a non-root process that is in the shared
  memory.
- **A process that calls `setuid` without an exec is not isolated.** It keeps the memory and build
  it had: a root process that drops to a non-root uid and runs on stays in the shared memory with the
  plain build and can reach the kernel's memory. Only an exec moves a process into its own memory.
- **A forked process runs in a WebAssembly memory of its own**, whatever its uid. The child's bytes
  are not in the machine's shared memory, so no load or store of another process reaches them and
  none of the child's reaches the kernel or its parent. The kernel reaches it, and a non-root
  process in a memory of its own, only through host copies. Each copy is checked once against the
  size of that memory and refused when it leaves it: the syscall returns `EFAULT` and nothing
  outside the memory is read or written.
- **A shared mapping is copied, not shared, into a process with a memory of its own.** A fork child
  or a non-root exec that maps `MAP_SHARED`, a System V segment or a shared file gets the bytes the
  mapping held when it mapped them; its stores stay in its memory and the other mappers' stores do
  not reach it. Nothing is refused, so two such processes that rely on one shared mapping read stale
  data without an error.
- **Past 4,095 shared regions at once**, a new shared mapping is refused with `ENOMEM` (`shmat`
  leaves the segment unattached); it is never opened to every process. A region's id and the tags of
  every page it covered return when its last mapping goes, however much of the region that mapping
  covered.

Run only software you trust with the whole machine as root, and do not keep secrets in a machine
that runs code you do not trust.

## Authority Domains

Root in a machine is root of that machine and of nothing outside it. A deployment has four holders
of authority, and none of the other three is reachable from guest root:

| domain                  | holds                                                                                                                    | what guest root reaches                                                                                             |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| Linux root in a machine | the machine's kernel, processes and memory                                                                               | all of it                                                                                                           |
| the Worker host         | the isolate running the machine's Durable Object: its `env` (`MACHINE`, `ASSETS`), its SQLite storage and its WebSockets | only the imports below, which act on the machine's own memory and host state                                        |
| the deployment owner    | the owner token, which opens the terminal and types into the console                                                     | nothing: the token goes once over HTTP to whoever claims the machine, and the object keeps only its SHA-256 hash    |
| the Cloudflare account  | API tokens, deploys, routes, secrets and the storage of every Worker in the account                                      | nothing: the Worker binds only `MACHINE` and `ASSETS`, holds no variable or secret, and the machine has no link out |

`tests/c/authority.c` runs as root in a machine and looks for each of them: it scans the machine's
whole memory for values only the host holds (finding the kernel's command line, which the host did
put there), checks its environment and init's, and finds no `/dev/mem`, block device, TUN device or
network device other than loopback and tunnels over it; connecting to the Cloudflare API and
resolving its name both fail. `tests/c/run.ts` plants those values (a Worker-style secret, a
secret in the host process's environment, and a claimed owner token and its hash), scans every
memory the guest was given after the run, and checks every import the guest was instantiated with
against the surface below. `tests/unit/authority.test.ts` holds the same checks on the toy kernel,
the deployment's bindings, and the Worker's routing, where every path outside `/_gmux/` is answered
with 503 whatever the guest does.

Between a machine and everything outside it:

| boundary                        | what enforces it                                                                                                                      |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| guest and the Worker's bindings | guest code reaches the host only through the imports listed below; no import exposes `env`, storage, network clients or other objects |
| one machine and another         | each machine has its own `WebAssembly.Memory` and host state; guest code has no reference to another machine's                        |
| guest and the terminal          | the terminal requires the owner token, claimed once at first run and stored as a SHA-256 hash, compared in constant time              |
| guest and the host engine       | the V8 WebAssembly sandbox                                                                                                            |

## The Import Surface

User programs may import only the kernel's syscall entry points (`__wasm_syscall_0` to
`__wasm_syscall_6`), their memory and table, `__gmux_fuel` (a scheduling yield), `__gmux_vfork`,
`__gmux_vfork_exec` and `__gmux_vfork_exit`, `__gmux_fork` (fork of a program with resumable frames),
`__gmux_stack_move` (a new stack segment for a frame that outgrows its own), `__gmux_dlprep`, `__gmux_dlopen`, `__gmux_dlsym`,
`__gmux_dlclose` and `__gmux_dlerror` (`dlopen` of side modules the build registered),
`__gmux_digest` (an md5, sha1, sha224, sha256, sha384, sha512 or blake2b512 digest the host computes
over the program's own memory, which Katybug uses for a whole digest stream, and, in a machine given
the `inflate` option, a raw deflate stream the host decodes for a gzip member: ops 8 to 13, which
read the task's own memory through a constructor view), and `__wasm_abort`. `scripts/cc-strict`
refuses to link a program that imports anything else, the host refuses to instantiate one, and
`scripts/wasm/stage-katybug.ts` refuses to stage a Katybug build that does. The guarded builds (run by a non-root process only while it is in the shared memory) also import the page owner table's
address, the process's tag and the address of its region set, all read-only, and `__gmux_denied`,
which ends the process.

`dlopen` loads only side modules whose bytes hash to a module compiled with the build; other files
are refused, since a Worker cannot compile code at run time.

The kernel imports the host's driver functions: task switching, idle waits, the console, the clock,
random bytes, executable loading and the network relay's calls, among them `wasm_net_connect`, which
asks the host whether an outbound connect may proceed and answers a refusal by default. They take kernel
pointers into the machine's own memory and act only on that memory and that machine's host state
(`wasm_net_connect` is a kernel import, so it is not in the program import set the loader checks).

## Threat Matrix

| threat                                                                                                                          | status                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| a non-root process alters the kernel or another process in the same machine                                                     | refused for a process exec'd as non-root: it runs in a memory of its own (with `kernel.gmux_own_exec` 0, in the shared memory under the guarded build, which checks every store and syscall buffer against the kernel's page owner table). Possible for a process that called `setuid` without an exec: it keeps the shared memory and the plain build                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| a non-root process reads the kernel or another process in the same machine                                                      | refused for a process exec'd as non-root, by the same two forms (a memory of its own, or the page owner table under the guarded build); possible after `setuid` without an exec                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| a non-root process reaches memory another process maps shared                                                                   | refused unless it maps the same segment, file or anonymous region itself (a vfork child and a thread share their parent's; a program the child execs does not)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| a non-root process uses up the region ids to get an open mapping                                                                | refused: past 4,095 regions a mapping fails with `ENOMEM`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| a forked process passes a syscall buffer, length or iovec that leaves its own memory                                            | refused: the host copy is bounded by the memory's size with no 32-bit wrap, and the syscall returns `EFAULT`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| a non-root process keeps reaching a page after it is unmapped or detached                                                       | refused: the next load or store faults, whether it was parked in a syscall or at a fuel yield                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| a non-root process writes a region it mapped read-only, through a syscall                                                       | possible: syscall buffers are checked for access to the region, not for its write permission                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| root turns off the memory of its own for non-root execs                                                                         | possible: `kernel.gmux_own_exec` is a root-writable sysctl (mode 0644, 0 or 1, default 1); root is trusted with the machine and can already run its own programs. Later non-root execs then run the guarded build in the shared memory, or are refused when no guarded build is registered                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| a machine with a live non-root process is checkpointed                                                                          | refused: a checkpoint is not taken while any process has a memory of its own, so such a machine keeps no state through an eviction until those memories are saved. An availability limit, not an exposure                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| a guest process sets IP options on a TCP socket and the kernel frees them while a retransmitted SYN reads them (CVE-2026-98432) | fixed in the kernel: `inet_opt` and `ireq_opt` are freed after an RCU grace period (upstream commit `e3f33b0a1d89d738e2b913dab519226eaf76e15b`, in the 7.3 base; the 7.0 base carried it as patch 0043). A guest process can set the options (`setsockopt` with `IP_OPTIONS` returned 0 for 3,000 of 3,000 loopback connections, with and without the patch); the probe makes real option objects and frees them 3,000 times and does not exercise the race                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| a root process alters the kernel or another process                                                                             | possible; root is trusted with the machine                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| a process loads code the build did not compile                                                                                  | refused: `dlopen` and `exec` take only registered modules; a refused `exec` ends the process with `SIGSEGV`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| an exec runs a module whose data is larger than the mapping its stub asked the kernel for                                       | refused: the build records the module's data size and the host refuses the exec when it exceeds the stub's page-rounded size; a module built before that record is not checked                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| a process reaches a Worker binding, secret or Durable Object storage directly                                                   | refused: no import exposes them                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| guest root reads a Worker secret, the host's environment or the owner token                                                     | refused: none of them is ever in the machine's memory, which root can read whole                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| guest root writes the Durable Object's storage                                                                                  | refused: the machine holds no storage handle; the object stores only the owner hash and placement records                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| guest root publishes a site or deploys a Worker                                                                                 | refused: the machine cannot reach the Cloudflare API (an outbound connect to a Cloudflare address is refused, see the outbound row); paths outside `/_gmux/` go to the machine's own port-80 listener as ordinary connections (503 when none listens), see the next rows                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| a page the machine serves reads the owner token or acts as the owner                                                            | refused for script in a guest page: every proxied reply carries `Content-Security-Policy: sandbox allow-scripts allow-forms` (an opaque origin, so no read of `localStorage['gmux-token']`), the guest's `set-cookie` and `clear-site-data` are dropped, and the browser's `cookie` and `authorization` never reach the guest. Guest and control plane still share one origin; a separate origin for guest traffic is the stronger fix                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| the machine answers an HTTP request with a malformed or hostile response, or a client sends one                                 | the host parses a guest-controlled response (head bounded at 64 KiB, bad framing is a 502) and injects client bytes into the guest through a kernel socket; `/_gmux/` stays out of the guest's reach because the site forwards only other paths; a checkpoint saves a stream its owner holds between two requests (its socket and the relay's connection are in the kernel's memory) and is refused while a request is in flight or the relay owes the kernel an event. The site's machine starts lighttpd from `rcS` when the boot line carries `gmux.http=lighttpd` and the image has it, with a guest keep-alive idle of 3,600 s (`etc/lighttpd.conf`), so a guest connection can outlive an absent client by up to an hour unless the host ends it. Bounded: at most 20 open streams (the next answers 503) and a 256 MiB request body (413, before the machine wakes for a declared length), measured at 800 pages. A stream whose client has not read for 30 s is closed and its slot freed, and a kept-alive stream idle for 3 s is dropped (a restored stream gets one fresh window); both are counted in the 20. Open: a client that reads one part every 29 s still holds a slot (only a total of requests per client would bound that), the 256 MiB bound is a CPU bound, so a guest that keeps an upload in RAM wedges near 20 MiB, and `/_gmux/status`, which needs no token, reports counts of open, serving and idle streams |
| the relay lends a buffer to the host and the host releases an address the guest never lent                                      | bounded: the kernel keeps a lent buffer until the host releases its address, and a release of an address that is not a live buffer frees nothing (a magic word per buffer); the host is the Worker, so the address it sends is trusted, and a body stream that reads ahead would see a buffer reused (the local workerd behaviour that makes the lend exact is a dependency: a stream that reads nothing ahead kept 128 of 128 chunks intact, an overwrite at enqueue corrupted 124 of 128)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| a guest page registers a service worker on the shared origin                                                                    | refused in Chromium 153, WebKit 26.6 and Firefox 151: the sandbox CSP makes `register()` throw, and none of the three acts on a `Link: rel=serviceworker` header; the sandbox CSP is the only barrier while guest and control plane share one origin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| a forked process passes a path, argument or iovec array that has no NUL, or runs past the end of its memory                     | refused: the host's scan stops at the memory's size, nothing outside it is read, and the syscall returns `EFAULT` (`strnlen_user`: 0) as Linux does at an unmapped page                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| a guest program connects to an address outside the machine (kernel patch 0047, `src/worker/machine/outbound.ts`)                | bounded: the kernel asks the host through `wasm_net_connect` before it opens the guest's socket, and the host answers a refusal unless the machine was given a factory, so a site without one keeps ENETUNREACH. The host refuses loopback, private, link-local and Cloudflare destinations and port 25 (edgeport's `workersRefusal`; an allow list of CIDRs lifts only the private and link-local reasons, never loopback, Cloudflare or port 25), counts connects per event against the subrequest limit (50 by default; the 51st is refused), times a connect out after 30,000 ms and maps a failure to `ECONNREFUSED`, `ECONNRESET`, `ETIMEDOUT`, `ENETUNREACH` or `EHOSTUNREACH`. Each stream holds at most 64 KiB toward the guest and 64 KiB toward the peer before it waits. A checkpoint resets every open outbound stream (the guest's socket sees a reset) and refuses to proceed if one stays open, because a peer's connection cannot be restored. The unit test file passes; the checkpoint block has no test that reaches it                                                                                                                                                                                                                                                                                                                                                                                                 |
| a guest process seals a memfd and relies on the seal (kernel patch 0046)                                                        | enforced for a memfd on ramfs: each inode carries a seal word that starts at `F_SEAL_SEAL`, and a write under `F_SEAL_WRITE` or `F_SEAL_FUTURE_WRITE`, a write past the end under `F_SEAL_GROW` and a truncate under the shrink and grow seals are refused as on tmpfs. A `mmap` race on a sealed file is named open in the item's notes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| a guest process asks for a name that does not exist in a ramfs or tmpfs directory (kernel patch 0050)                           | with `fs.gmux_negative_lookup` at 1 the answer is `ENOENT` without allocating a dentry, for the filesystem magic of ramfs or tmpfs, a plain `simple_lookup` directory and a name within `NAME_MAX`; the sysctl is root-writable, mode 0644, values 0 to 2, default 0 (off). At 2 the lookup also runs and `fs.gmux_negative_mismatches` counts answers it contradicts (0 in 36 of 36 probes in three modes)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| a forked Katybug process grows its learned fork table without bound                                                             | bounded: the table doubles up to `HINTS_MAX` of 1,048,576 entries (a 16 MiB table) and, once a growth is refused, `hint_full` stops every later retry, so a nommu guest with little contiguous memory is not driven into a retry storm. The guard has a regression test that fails on the unguarded code; the 4,198,400 B allocation failures in a coreutils run do not come from this table and their source is not named                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| an x86-64 ELF guest calls `openat2`                                                                                             | not routed through the hook route's durability handling: no program in the census, the boot image or the repository calls it (0 hits in all nine boot modules and the initramfs), so the gap is recorded and not closed (P33 decided to leave it unhandled for the census and the boot image; what a program that does call it would get has not been tested)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| guest root opens a connection outside the machine                                                                               | refused for loopback, private, link-local and Cloudflare destinations and port 25, and for every destination when the machine has no outbound factory; allowed to any other address the host's policy passes, as the previous row says (before patch 0047 its only network devices were loopback and IP tunnels over it)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| a process reads another machine's memory                                                                                        | refused: separate memories, no shared host state                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| a process instantiates a module with an unlisted import                                                                         | refused at link time and at instantiation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| a visitor opens the terminal without the owner token                                                                            | refused                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| a foreign program drives the host's zlib through Katybug's stream kernels with a hostile `z_stream`                             | bounded: streams live in a table of 64 slots, the guest's struct is kept in step and read through checked copies, and a fault in a guest pointer returns before the host call; a stream the table does not hold (open across a fork by exec) is not served, so the guest's own libz fails its state check (`Z_STREAM_ERROR`); an object that imports header or back entries is never served                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| a program feeds, reads or closes a host digest it did not open, or claims another task's copy                                   | refused: a digest belongs to the task that opened it; a copy made for a fork is claimed only by a child of the task that made it, once; an address outside the program's memory is refused before the host reads it                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| a program fills the host's memory with open digests                                                                             | bounded: 64 open digests and 16 unclaimed fork copies per task, dropped when the task ends; a refused open falls back to the program's own code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| a program feeds the host a decompression bomb through the inflate ops, or opens streams without end                             | bounded per task and per machine: at most 4 streams a task, 4 MiB fed a call, 32 KiB of output a call and 256 MiB of decoded bytes a task, and `MachineOptions.maximumInflateBytes` (default 64 MiB) for the streams of all tasks together, counted in whole 1 MiB pieces; all dropped when the task ends. A stream ends with an error on a bad deflate stream, is taken only from a regular file with at least 8 bytes after it, and a checkpoint is refused while one is open; the guest's own decoder runs in every other case. Input that stops inside a stream never reports an end, so a caller takes only a 1, and a bit flip in raw deflate is not an error (the caller checks a digest or gzip's trailer). The site does not pass the `inflate` option yet, so the bound is not live there                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| a foreign program writes, fetches or reads against its mapping's rights                                                         | refused in Katybug: every mapping carries its rights, a fetch from a non-executable page, a write to a read-only page and an access the mapping does not allow end with `SIGSEGV` and the right `si_code`, a store to a page that holds decoded code makes its blocks stale, and a lifted region is never attached to a block on a page that is both writable and executable (555 checks, 11 of 11 mutants caught); the host digest and inflate ops read guest memory through checked copies. A write window not refused on a writable and executable page is caught by no guest, and a store to such a page takes a slow path (+18.5%)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| a non-root process hashes memory it does not own through the digest import                                                      | refused: Katybug, the only program that imports it, has no guarded build, so a non-root process runs it only in a memory of its own, and the import reads and writes that memory through views that throw past its end. With `kernel.gmux_own_exec` 0 a non-root process cannot exec Katybug at all; the import checks addresses against the memory's size, not the page owner table, so a guarded Katybug would need that check first                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| a program reads the previous process's data through an exec's data mapping                                                      | refused: patch 0044 maps a program's data and bss with `MAP_UNINITIALIZED` only when the mm is in the kernel's memory and tells the host through `wasm_load_program` (the new name of `wasm_load_executable`, the mapping's length as a fifth argument) that the mapping is not zeroed, and the host writes every byte of it before the program runs (`zeroData`); a program's own `mmap` still returns zeroed memory and the stack and argument mappings stay zeroed. A host without the new import cannot instantiate the kernel (a rig run shows the `LinkError` for `wasm_load_program`; no unit test pins it), and an exec in a memory of its own keeps the kernel's zeroing. The `zerodata` probe checks the bytes; its placement guard fails in about 1 of 40 to 1 of 80 `SHARE` gate runs (a threshold, not a leak)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| a busy guest task starves the RCU callbacks a clock step leaves due                                                             | bounded: `rcS` sets each `ksoftirqd` thread to `SCHED_FIFO` priority 1, so a task that holds its cpu cannot starve them (0 of 24 runs killed against 9 of 24 without it, under a synthetic 3 s step per checkpoint). It is a guest scheduling change for every workload; the deployed `survive` with it has not run                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| a write reaches a file's pages that several Katybug processes share                                                             | not in the shipped build, which gives every process its own copy of a file's pages. A build with `KB_SHARE=1` maps read-only pieces of a file into every process that reads them and copies a piece on its first write; a write path that skipped the copy would change the file's pages for all of them, and a machine has no MMU to stop it (the native test builds fault on such a write)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| a process exhausts its machine's CPU or memory                                                                                  | bounded by fuel, invocation quanta, the machine's memory maximum and a `kernel.threads-max` that `rcS` sets from the free memory at boot (a `vfork` past it returns `EAGAIN` before the out-of-memory killer runs; the `taskcap` probe passes locally and stops early on Free, unexplained); the machine, not the deployment, degrades                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| two machines started from the bootstrap image, or from one copied checkpoint, draw the same random numbers                      | refused: after every restore the kernel mixes 32 fresh host bytes into its entropy pool and reseeds its crng before a process runs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| two machines started from the bootstrap image share values the kernel chose at boot                                             | possible: hash-table keys, the TCP sequence-number secret and the boot id come from the image; the crng and everything drawn from it after the restore do not                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| anyone reads the bootstrap image                                                                                                | open: it is a static asset of the deployment, taken from the public build before any claim, and holds no owner token, secret or user data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| a process escapes the V8 WebAssembly sandbox                                                                                    | out of scope for gmux; report it to the engine's maintainers                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| timing side channels between machines                                                                                           | not addressed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
