Skip to content
Memory Security

09. Memory Security

Cleanup mechanisms do not imply universal physical erasure

The CPU lifecycle tracks request ownership. KVCachePool wipes physical slots before reuse and rejects cross-user frees. RequestMemory wipes tensors and mutable buffers. ClientBoundary zeroes its embedding/head store on close. Python memory telemetry contains counts, never request content.

Native controls

xurcroh_burn_alloc.cu zeros on allocation and on free. The free path issues cudaMemsetAsync and synchronizes the allocation stream before cudaFree, preventing reuse through that allocator before the wipe completes. KV pools need separate wipes because logical release never reaches the allocator.

ChaCha20 kernels implement actual 20-round block generation and modulo-2162^{16} mask/unmask. The shared-memory epilogue and uniform page-touch path are best-effort mitigations. They cannot prove all physical registers, every SRAM location, or another device’s local memory is clear.

The memory lifecycle, live, for the start of the question you chose. Press “Try to break it” to skip the wipe and see what the next user reads.

What goes in

Its first four characters, “How ”, are stored as the bytes 48 6f 77 20.

What the next user of that memory reads

Nothing yet: the memory is still in use for your request.

What comes out

The model's answer Nothing yet.

It can only be written when all 6 steps are done. Now at step 1: Set aside.

  1. 48 6f 77 20 (4 bytes)“How ”
  2. —
  3. —
  4. —
  5. —
  6. —

Step 1 of 6 Memory is set aside for your request, and the start of your question is written into it. The four bytes now read 48 6f 77 20.

Why it matters Memory is handed to the next request only after the wipe has actually finished, so there is nothing left to read.

  • secret bytes in use
  • zeroed
  • stale bytes left behind
  • 0x48: A secret byte of the current request.
  • 0x6f: A secret byte of the current request.
  • 0x77: A secret byte of the current request.
  • 0x20: A secret byte of the current request.

With the wipe in place, the next request reads only zeros.

How hard is this to undo?

In memory while your request runs
48 6f 77 20
Read back by the next user
00 00 00 00

After a completed wipe there is nothing left to recover: the bytes are zeros, and zeros are the same whatever was there before.

Where it stops. This shows the memory a program can read back. A software wipe does not prove that every register and cache inside the chip was cleared.

Why this protects you
Memory is handed to the next request only after the wipe has actually finished, so there is nothing left to read.
It relies on
The wipe completes before reuse, on every pool that held your data.
Where it stops
A software wipe does not prove that every physical register and cache inside the chip is cleared.

The questions and answers are prepared: no language or image model runs in this manual. The numbers on this page are computed in your browser from the question you chose.

Schematic drawing, step by step
GPU memory lifecycleA buffer is allocated, written with secret data, released, then the stream is synchronised and the bytes are zeroed before the buffer is reused. If synchronisation is skipped the wipe may still be queued when the buffer is handed to the next owner, who can then read stale secret bytes.Allocatebuffer handed outExecutesecret data writtenReleaseallocator marks freeSynchronisewait for the streamZerooverwrite the bytesReusereads back zerossynchronisation skipped: the wipe is still queuedThe next owner can read stale secret bytes.Freeing memory is not erasing it.

Walk through the 7 steps with Play or Next, or point at a box to see what it connects to.

The model's answer: Your device splits every number into two random shares. Each worker gets one share of your data and one share of the weights, and a single share is uniformly random on its own. Your device checks the four products and adds them to get the result. This holds as long as the workers do not pool their shares.

Look inside:

Choose a question, step through, and open any part to see what it holds for that question. The questions and answers are prepared; the numbers are computed in your browser.

Figure 9.1: Allocate, execute, release, synchronise, zero, reuse. Skipping synchronisation can hand the next owner a buffer whose wipe has not run yet.

The memory laboratory makes this residual-disclosure path interactive. Request-scoped KV caches use positional-offset prefill/decode and are zeroed on drop_request, including errors and cancellation. /v1/capabilities exposes only the aggregate entry count; integration tests verify zero entries after inference. CUDA tests are executable but explicitly skipped without CUDA; no local result is presented as a hardware forensic proof.

Choose your language

All languages are equal. Pick the one you want to browse in.

Europe

Middle East & North Africa

South Asia

Southeast Asia

East Asia

Central Asia & Caucasus

Africa

Oceania

Constructed & Classical