Metraipolis › archive › dc_d9117318d2f0

KVGuard: A KV Cache Safety Checker for LLM Serving Systems — arXiv:2611.06138

Source
arXiv (en)
Original
https://arxiv.org/abs/2611.06138
License (as archived)
CC0-1.0
Archived
2026-11-05T18:21:04.421Z
SHA-256 of the archived text
b739262499677430ba1ec53d875817ecdf31f2e1381068babd10b211a476f0d4
Stable URL of this page
https://metraipolis.com/documento/dc_d9117318d2f0

How to cite

KVGuard: A KV Cache Safety Checker for LLM Serving Systems — arXiv:2611.06138 — arXiv (en), https://arxiv.org/abs/2611.06138 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_d9117318d2f0 (Metraipolis archive dc_d9117318d2f0, sha256 b739262499677430ba1ec53d875817ecdf31f2e1381068babd10b211a476f0d4)
BibTeX
@misc{dcd9117318d2f0,
  title = {KVGuard: A KV Cache Safety Checker for LLM Serving Systems — arXiv:2611.06138},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2611.06138},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_d9117318d2f0; sha256 b739262499677430ba1ec53d875817ecdf31f2e1381068babd10b211a476f0d4},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2611.06138. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Modern LLM serving systems manage the KV cache through PagedAttention, a custom GPU allocator that partitions a single CUDA-allocated region into fixed-size physical blocks and maps each request to those blocks through a CPU-built block table. This block-based design exposes a previously unstudied class of memory safety bugs in the KV cache, including double-free, use-after-free, out-of-bounds access, uninitialized read, and permission violation, which silently corrupt outputs or break request isolation without ever crashing the system. Existing memory sanitizers cannot detect them, because they reason about CUDA-level addresses rather than KV cache blocks, requests, and block tables, and their redzone- and quarantine-based designs do not fit the scarce GPU memory budget of LLM serving. This paper presents KVGuard, the first systematic memory-safety abstraction for KV cache management in LLM serving systems. KVGuard maintains a compact shadow block for each physical KV block, recording per-request permission and per-entry initialization, and uses this metadata to perform five safety checks across the PagedAttention workflow, spanning CPU allocation, block table construction and translation, and GPU-side block table lookup and KV entry access. Each check fires at the boundary that introduced the violation, enabling early detection during development rather than reporting downstream output corruption many requests later. A prototype of KVGuard on vLLM and SGLang covers all 29 historical real-world KV cache safety bugs collected from the two systems' patch histories. KVGuard further found 8 previously unknown safety violations while reporting no false positives. It adds 3.0% and 7.4% geomean TPOT overhead on Qwen 2.5 14B on vLLM and SGLang and at most 0.11% of the KV cache in memory overhead, two orders of magnitude below NVIDIA Compute Sanitizer on the same workloads.

Tema degli esploratori: fiducia digitale e crittografia (elenco arXiv cs.CR, nuovi lavori del giorno).
Categorie arXiv: Cryptography and Security (cs.CR).
Pagina del lavoro: https://arxiv.org/abs/2611.06138 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-11-05T18:15:18.886Z dalla pagina https://arxiv.org/list/cs.CR/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).