Governing the KV Cache: Preventing Timing Side-Channel Leakage in Multi-Tenant LLM Inference
作者: Tejasvi C. Addagada
分类: cs.CR, cs.AI
发布日期: 2026-08-10
备注: 12 pages, 5 figures, 9 tables. Measurements on NVIDIA A100 with vLLM 0.26.0, independently replicated on llama.cpp/Apple Metal. Experimental scripts and raw results available from the author on request
💡 一句话要点
提出KVGov以解决多租户LLM推理中的时序侧信道泄露问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 时序侧信道 多租户系统 大型语言模型 缓存安全 隐私保护
📋 核心要点
- 现有的多租户LLM推理中,KV缓存共享导致恶意租户通过时序侧信道攻击重构其他租户的私密提示,存在严重安全隐患。
- 论文提出KVGov治理层,通过引入每个主体的盐值,确保缓存键在不同主体之间的密码学隔离,从而防止信息泄露。
- 在真实硬件上进行的实验表明,KVGov能够有效降低攻击者的预期效用,验证了其在生产环境中的可行性和有效性。
📝 摘要(中文)
关键值(KV)缓存是现代大型语言模型(LLM)推理中的主要吞吐量优化手段,允许请求之间的前缀重用。然而,在多租户环境中,这种缓存被多个租户共享,导致时序侧信道的产生:恶意租户可以通过探测缓存命中延迟重构其他租户的私密提示。本文提出KVGov,一个治理层,针对三种攻击(PROMPTPEEK、EarlyBird和InputSnatch)提供统一的解决方案。通过使用每个主体的盐值sigma_p = HMAC_K(secret, principal_id)来种子块哈希链,使得缓存键在主体之间具有密码学上的不相交性。实验表明,KVGov在真实硬件上有效,能够显著降低攻击者的预期效用。
🔬 方法详解
问题定义:本文旨在解决多租户LLM推理中KV缓存共享导致的时序侧信道泄露问题。现有方法未能有效防止恶意租户通过探测缓存命中延迟来重构其他租户的私密提示,存在安全隐患。
核心思路:KVGov通过引入每个主体的盐值sigma_p = HMAC_K(secret, principal_id)来种子块哈希链,使得不同主体的缓存键在密码学上不相交,从而防止信息泄露。该设计确保了缓存的安全性,同时保留了前缀缓存的效益。
技术框架:KVGov的整体架构包括一个治理层和ORIGAMI调度器。治理层负责管理缓存的安全性,而ORIGAMI调度器则通过Stackelberg水填充策略来降低攻击者的预期效用。
关键创新:KVGov的主要创新在于通过盐值的引入实现了缓存键的密码学隔离,解决了现有方法无法有效防止时序侧信道攻击的问题。与传统方法相比,KVGov在安全性和性能之间取得了良好的平衡。
关键设计:在实验中,KVGov通过1000次试验验证了盐值的必要性和充分性。此外,ORIGAMI调度器在现实的租户异质性下,能够将攻击者的预期效用降低12.6%。
🖼️ 关键图片
📊 实验亮点
实验结果表明,KVGov在真实硬件上实现了0.22的冷/缓存TTFT比率,验证了时序侧信道在生产规模下的可利用性。此外,KVGov通过盐值的引入,保留了93%的前缀缓存效益,确保了安全性与性能的平衡。
🎯 应用场景
该研究的潜在应用领域包括云计算环境中的多租户大型语言模型推理,尤其是在需要保护用户隐私的场景中。通过有效防止时序侧信道攻击,KVGov能够提升多租户系统的安全性,促进更广泛的AI应用落地,尤其是在金融、医疗等敏感行业。
📄 摘要(原文)
The key-value (KV) cache is the primary throughput optimization in modern large language model (LLM) inference, enabling prefix reuse across requests. In multi-tenant deployments this cache is shared across tenants, creating a timing side channel: an adversarial tenant can reconstruct another tenant's private prompt by probing cache-hit latency. Three published attacks exploit it -- PROMPTPEEK, EarlyBird and InputSnatch -- reaching up to 100% attack success rate against unprotected vLLM and SGLang, with rates varying by cache architecture and prompt structure. We present KVGov, a governance layer addressing all three attack families' prefix-cache paths under one mechanism. A per-principal salt sigma_p = HMAC_K(secret, principal_id) seeds the block-hash chain, making cache keys cryptographically disjoint across principals. An ablation (N=1000 trials, seed 2026, deterministic judges) isolates this salt as the necessary and sufficient component. KVGov adds ORIGAMI, a Stackelberg water-filling audit scheduler that reduces adversary expected utility by 12.6% at realistic tenant heterogeneity (Gini 0.63), and an evolutionary stability analysis giving a 31.6% adversary-prevalence tipping point below which global caching remains stable. On real hardware (Qwen2.5-7B-Instruct, vLLM 0.26.0, NVIDIA A100) we measure a gate-verified cold/cached TTFT ratio of 0.22, confirming the channel is exploitable at production scale; the defense itself is evaluated in simulation calibrated to those measurements. We replicate the channel on an independent stack (llama.cpp on Apple Metal, ratio 0.093). Finally, isolation and cache efficiency need not conflict: identifying information resides only where prompts diverge, so injecting the salt at that boundary rather than the chain root retains an estimated 93% of the prefix-cache benefit with no cross-principal signal.