BlockJack: a cross-tenant redirection fault attack targeting paged KV cache address translation in LLM servingBlockJack: Cross-Tenant Redirection Fault Attacks on Paged KV Cache Address Translation in LLM Serving
The authors propose BlockJack, which redirects KV cache reads by fault-injecting modifications to vLLM block table entries; the authors report a covert RA degradation rate of 5.2%–41.1% on 248 medical scenarios.
In multi-tenant LLM services, the attacker Mallory is an unprivileged software visitor who shares a physical machine with the victim Bob, can submit ordinary API requests and induce faults (taking Rowhammer as an example) to tamper with the block id in a selected block table entry; knows the public service configuration, cannot read others' prompts, outputs or KV state; the OS and hypervisor enforce isolation normally.
- Paged LLM services such as vLLM use a block table to map a request's logical KV blocks to physical blocks; this layer of address translation metadata determines which cached states each tenant reads. Existing fault attacks mostly target model weights or KV values, and the authors state that the KV cache mapping layer has not yet been studied.
- BlockJack uses faults (with Rowhammer as the PoC) to tamper with the block id in a block table entry: changing the attacker's entry achieves context disclosure (CD), and changing the victim's entry achieves response alteration (RA). The authors formalize the predictability of the target block id under different allocator states, and construct a 248-scenario medical benchmark to evaluate RA.
- Under software-simulated faults, CD leaks the victim's context on all 7 models across 4 families; RA achieves covert downgrade rates of 5.2%–41.1% on 248 medical scenarios (7 models × 5 judges). Physical Rowhammer experiments on the vLLM CPU version validate CD in 3/10 and RA in 8/10 campaigns; the validation patches for vLLM and Sonar were reviewed and verified by the authors.
- The authors point out: once the allocator is fully used, block ids cannot be precisely predicted, and the attack degrades to probabilistic and non-targeted; end-to-end GPU Rowhammer is left as future work. Physical experiments were conducted only on a DDR4 CPU platform, with the vLLM 0.25.0 CPU version and Llama-3.2-1B-Instruct; cross-framework experiments used only Qwen2.5-1.5B-Instruct to verify the mechanism.
- Evaluated models
- Qwen2.5-1.5B-InstructQwen2.5-7B-InstructLlama-3.2-1B-InstructLlama-3.1-8B-InstructGemma-2-2b-itGemma-2-9b-itPhi-3.5-mini-instruct
- Benchmarks
- ChatDoctor-HealthCareMagic-100k(派生 248 场景医疗基准)
- Metrics
- Covert Downgrade Rate (CDR)SeverityDetectabilityDisclosure(是否泄露)validated campaigns/windows
The paper proposes BlockJack, which the authors describe as the first fault injection attack targeting KV cache address translation in LLM inference. The attack tampers with block table entries that record the mapping from logical blocks to physical blocks in paged serving frameworks such as vLLM, redirecting one request's KV cache reads to other tenants' request cache blocks, without modifying model parameters, prompts or cache contents; the authors completed a physical proof of concept with Rowhammer and reproduced two attacks via software emulation on SGLang and Sonar. In Context Disclosure, the victim's context appears in the attacker's reply; in Response Alteration, context injected by the attacker steers the victim's answer. On 248 medical scenarios built from real patient messages in ChatDoctor-HealthCareMagic-100k, the covert degradation rate across seven models in four families—Qwen, Llama, Gemma and Phi—was 5.2%–41.1%, and tampered replies recommended care of lower urgency while still being judged relevant.
Why it was selectedPrevious fault attacks against LLMs mostly corrupted weights or cache values; this paper shows that a single block table fault can redirect cache reads across tenants and steer replies.
Related events and news
1 events · 1 news mentions
News that mentions this paper
大模型安全周报:单步合规检查挡不住智能体跨步骤组合危害
- 公众号 大模型安全研究cites the paper's id or link大模型安全周报:每一步都合规,拼起来就是一次入侵
BlockJack: Cross-Tenant Redirection Fault Attacks on Paged KV Cache Address Translation in LLM Serving(https://arxiv.org/abs/2611.25945)
Paper analysis
What problem does this paper attempt to solve?
The authors study whether the address translation mapping of a paged KV cache can be tampered with by fault attacks, and its impact on multi-tenant confidentiality and integrity.
Core question: In paged LLM services such as vLLM, can the block table, a layer of software-managed address translation metadata, be exploited by fault injection attacks (FIA), thereby causing cross-tenant information leakage and response tampering.
- Scenario and importance: Frameworks such as vLLM, Sonar, and SGLang use PagedAttention to map each request's logical KV blocks to physical KV blocks; the block table determines which cached states each tenant accesses. The authors state that existing security audits all focus on the data plane (model weights, KV values) and ignore this layer of mapping metadata.
- Shortcomings of existing methods: The authors state that previous fault attacks against LLMs tamper with values that directly participate in inference, such as weights or KV cache contents; whereas fault attacks in the OS domain have long used metadata such as page tables to redirect memory access, a similar layer in LLM services has not yet been explored.
- Core observation: The block table resembles an OS page table; changing a single entry can redirect access; moreover, this metadata has no sparsity, every bit is critical, and a fault is very likely to produce observable consequences. The mapping space is far smaller than the weight or KV value space, so even non-targeted faults may produce harmful results.
- What the paper proposes: The authors propose BlockJack (Block Hijack), which they state is the first fault attack targeting the KV cache address translation mapping in LLM inference, containing two goals, context disclosure (CD) and response alteration (RA), and provide a formal analysis of block id predictability, a 248-scenario medical benchmark, a physical Rowhammer PoC, and a defense evaluation.
- Threat model:
- Goal: Mallory makes her own reply leak Bob's sensitive predicate sB (CD), or makes Bob's reply be guided by Mallory's context (RA).
- Knowledge: Knows the public service configuration (tokenizer, chat template, input format and related settings); cannot observe other users' prompts, outputs or KV state.
- Capability: Unprivileged software access, shares a physical machine with the victim, can submit ordinary API requests and induce faults to tamper with the block id of a selected block table entry; takes Rowhammer as an example primitive and adopts the standard Rowhammer fault model.
- Victim system: A multi-tenant LLM service instance that batches different users' requests for the same model; assumes the OS and hypervisor normally enforce process isolation and memory protection.
What related research exists?
Related work falls into three groups: passive side channels, application-layer manipulation, and fault attacks; the authors state that BlockJack is the first fault attack targeting KV mapping metadata.
Passive attacks (side channels)
- Weiss et al. [8]: infer per-token lengths from packet lengths of encrypted streaming responses, then reconstruct plaintext with a fine-tuned LLM.
- Zheng et al. [11], Song et al. [12]: exploit response-time differences between prefix/KV and semantic cache hits and misses to infer user inputs and system prompts.
- Wu et al. [9]: exploit longest-prefix-match scheduling priority, using the return order to determine whether a guessed token hits the victim's cached prefix.
Application-layer active attacks
- Prompt injection [13] and PromptLocate [42]: place attacker instructions in external data processed by the LLM application; PromptLocate locates injected content to support detection and recovery.
- Cache Me (Wu et al. [10]): exploit collisions in prefix, semantic, and multimodal cache lookups so that subsequent requests reuse attacker-prepared cache state, achieving cache poisoning and content moderation bypass. The paper points out that application-layer attacks go through explicit input and cache lookup interfaces and can be directly defended against with prompt localization, cache salting, collision-resistant hashing, etc., whereas FIA bypasses these interfaces.
Fault attacks (data plane)
- Yamamoto and Matsuura [18]: use idealized software injection to study single-bit flips in the value tensor of vLLM shared prefix blocks; the paper points out that they did not evaluate realizability under hardware Rowhammer constraints.
- CacheTrap [19]: identifies bits in cached KV values that can trigger attacker-chosen behavior, and reproduces GPUHammer's bit-flip benchmark.
- PrisonBreak [16], TFL [17]: use targeted bit flips to jailbreak aligned LLMs and to steer selected prompts toward attacker-specified answers, respectively, both demonstrating physical Rowhammer on model weights (GPU and CPU memory).
OS/hardware-layer fault attacks
- CPU page table and pointer attacks: Drammer [20], Flip Feng Shui [30], RAMBleed [31], Go Go Gadget Hammer [22], etc., cross memory isolation boundaries.
- GPU fault attacks: GPUHammer [35], GeForge [23], GDDRHammer [36], GPUBreach [37], GPUThor [38] (ECC GPU).
Baselines and comparison: The paper has no experimental baseline method; Table 1 compares BlockJack with the above active attacks by target (input/lookup, weights/KV values, KV mapping) and security impact (confidentiality/integrity), and BlockJack is the only work targeting KV mapping and affecting both. The authors position it accordingly: BlockJack tampers with service metadata rather than inference values, shifting defense from interface hardening to protecting and validating internal service state.
How does the paper address this problem?
BlockJack tampers with block table entries to redirect KV reads, is constructed in two variants, CD and RA, and formalizes the predictability of block ids across the allocator's states.
Overall idea: BlockJack does not modify model parameters, prompts, or cached KV state, but tampers with the block id of one entry in the block table, so that a request's KV cache reads are redirected to physical blocks occupied by another tenant's request.
Problem formalization
- Request r = (t0, …, tNt−1); each logical KV block spans B token positions, and position p satisfies blk(p) = ⌊p/B⌋, off(p) = p mod B.
- Entry Tu[i] of block table row Tu stores the physical block id corresponding to logical block i; the core read relation is b = Tu[blk(p)], (kp, vp) = (Kb[off(p)], Vb[off(p)]), i.e., the KV state at position p is entirely determined by the block table entry.
- In vLLM the block table row is an int32 array; MRV1 is stored in CPU main memory (the GPU backend copies it to the GPU before each forward pass), MRV2 (default for dense models since v0.25) resides directly in GPU memory, and with the CPU backend MRV2 is in main memory.
Two attack constructions
- CD (Context Disclosure): The fault changes Mallory's entry TM[IdxM] : bM → bB, her KV reads turn to Bob's blocks, and Mallory's reply leaks sB; combined with side information narrowing the candidate identities, attribute-level identity inference can be performed.
- RA (Response Alteration): The fault changes Bob's entry TB[IdxB] : bB → bM, Bob's reads come from Mallory's blocks; in the medical scenario Bob describes an emergency and Mallory describes a mild case of the same topic, and after redirection the reply remains relevant but recommends a lower level of care.
- Redirection window: From when the source block has its KV state written and the reader completes its last prefill write through that entry, until the source block is overwritten; within the window every decode step reads through the altered entry (Figure 3).
Target block id selection and prediction
- Same-index redirection (IdxM = IdxB) keeps RoPE positions aligned; cross-index redirection preserves the within-block offset but produces a fixed position offset of B × (IdxB − IdxM), and the authors state that the source content can still influence the reply (example in Figure 4b).
- In a newly initialized instance the free queue contains candidate ids {1,…,U} in ascending order (0 is reserved); with prior use the queue has the form Q = πF ∥ [H+1, …, U] ∥ πC (Equation 4), and an allocation at position a within the middle contiguous segment gets id Z + a + 1, independent of the internal order of πF and πC.
- Algorithm 1: given Z and an upper bound H̄, compute the number of dummy request allocations placed before Bob, Dpre, and predict b̂B = Z + aB + 1, b̂M = Z + aM + 1; returns ⊥ when aM ≥ U − Z. Mallory can lengthen her request to obtain more candidate logical blocks and insert dummy requests to shift ids.
- Under the fully used state the contiguous segment is empty and cannot be precisely predicted, so the attack degrades to probabilistic and non-targeted: it may hit an unintended tenant's block or be invalid.
Fault primitive and physical implementation
- The paper uses Rowhammer as the implementation (PoC), and states that any primitive capable of tampering with the target entry, such as voltage/clock glitching, lasers, or electromagnetic injection, is applicable.
- The physical implementation reuses the SWAGE framework and its Blacksmith hammerer; the authors implemented BlockJack's VictimOrchestrator and implemented DeepSteal's swap+refault technique as a new Page Injector to relocate already-allocated block table pages.
- A single bit flip achieving redirection must satisfy four conditions (R1 location: the id after the flip is still within the block pool; R2 value and direction match the request layout; R3 the block table page lands in a flip-prone physical frame; R4 the flip falls within the redirection window).
Success criteria and evaluation method
- CD criterion: whether the victim's context appears in Mallory's reply (the Disclosure column of Table 2).
- RA criterion: a 248-scenario medical benchmark is constructed (from 2,000 sampled patient messages from ChatDoctor-HealthCareMagic-100k, covering 25 chief complaints), using two metrics, Severity (four levels of treatment urgency) and Detectability (three levels: covert/subtle/overt), defining the Covert Downgrade Rate (CDR): the proportion of scenarios where the redirected reply has lower urgency and is still judged relevant.
- Review: 5 LLM reviewers (Qwen2.5–32B–Instruct, Prometheus–7B–v2.0, Selene–1–Mini, GLIDER, CompassJudger–1–7B), screened via 700 balanced calibration samples (FPR 1.4%–9.4%, TPR 89.4%–98.9%), each scoring according to its own prompt template.
What experiments did the paper conduct?
Under software-simulated faults, CD covers 7 models, and RA measures CDR on 248 scenarios; physical Rowhammer validates two attacks on the vLLM CPU version.
Experimental Setup
- Models under test (7): Qwen2.5-1.5B/7B-Instruct, Llama-3.2-1B, Llama-3.1-8B-Instruct, Gemma-2-2b/9b-it, Phi-3.5-mini-instruct, covering GQA, MHA, and SWA+full three attention types and 1–2 KV groups (Table 2).
- Platform: Main experiments on vLLM commit 0ecc284 (MRV2, GPU backend), block size B = 16, greedy decoding; additionally validated on MRV1 (commit 9558286) and CPU backend MRV2 (v0.30.0+cpu); cross-framework using SGLang (c16a8fc) and Sonar (5d9c85a).
- Fault method: Main evaluation is software-simulated fault injection (directly overwriting the device-side target entry under MRV2); physical experiments use SWAGE/Blacksmith on a DDR4 platform (i5-6400, 16 GiB DDR4-2133) to perform Rowhammer on the official vLLM 0.25.0 CPU version.
- Benchmarks: RA uses 248 medical scenarios (sourced from ChatDoctor-HealthCareMagic-100k, covering 25 chief complaints); topic proximity experiments n = 100 per served model (25 chief complaints × 4 scenarios), within-topic variation experiments n = 248.
- Metrics and judges: CDR (proportion degraded and covert); 5 LLM judges each score independently, results reported per judge.
- Repetitions: The paper does not report the number of repetitions for software-simulated experiments; physical experiments are 20 campaigns (CD and RA 10 each, each with a 90-minute cap).
Main Results
According to Table 4 (RA, each cell is CDR%, n = 248/model):
Swipe horizontally to read the table
Served model Selene GLIDER Qwen2.5 CompassJudger Prometheus Gemma-2-9b-it 30.6 41.1 30.2 32.0 37.1 Gemma-2-2b-it 38.7 34.8 29.0 35.1 29.8 Qwen2.5-7B-Instruct 33.5 27.0 20.6 37.7 37.1 Phi-3.5-mini-instruct 22.2 23.0 20.2 28.4 27.8 Qwen2.5-1.5B-Instruct 17.7 12.9 10.1 26.4 12.9 Llama-3.1-8B-Instruct 12.1 14.1 14.9 19.8 19.4 Llama-3.2-1B-Instruct 14.9 14.1 5.2 31.9 14.1 - The authors state that CDR ranges from 5.2%–41.1% across all model–judge combinations, the two Gemma models rank in the top three under every judge, and the two Llama models rank in the bottom three under four of the five judges.
- The share of first-level degradation ranges from 62.8% for GLIDER to 96.4% for Selene; the authors suggest the difference may reflect differences in instruction tuning and safety behavior, and has no consistent relationship with parameter count.
- CD main results (Table 2): a single block id fault produces observable leakage on all 7 models; differences in model scale, GQA ratio, attention pattern, and number of KV groups do not change the redirection mechanism.
Topic Proximity and Within-Topic Variation
According to Table 3 (downgrade/covert %, listed by judge, aggregated over 7 models):
- Topic proximity (n = 100, Mallory remains benign): after switching to a different chief complaint, the degradation rate changes by at most 1.7%, but the on-topic rate drops 11.4%–19.4%; the authors state that the same topic makes replies less likely to be noticed by Bob, and that domain-specific serving is a favorable condition.
- Within-topic variation (n = 248, same chief complaint): after Mallory changes from benign to routine, the degradation rate drops 7.8–12.9%, and the on-topic rate shows no consistent direction, ranging from −2.6% to +7.0%; the authors state this is consistent with the model giving advice based on Mallory's symptom description.
- The authors caution: even if urgency does not decrease, the resulting advice may not be appropriate for Bob's condition.
Physical Rowhammer Evaluation
- Profiling: 20 campaigns profiled a total of 637 allocations, 1,600 rounds, 6.1 hours of hammering, recording 667 bit flips (in 326 allocations); under the lane-0 restriction, 124 (18.6%) were candidates, and 41 were reproducible (reproduced in at least two of three rounds).
- Page placement: swap+refault succeeded in placing the block table page into the target physical frame at a rate of 36/302 (11.9%).
- Attack results (Table 5): CD validated 3/10 campaigns, RA validated 8/10; of 142 hammering windows, 70 (49%) changed the entry to the expected id, of which 60 showed the expected marker in decoded replies (CD 7/13 windows, RA 53/57 windows); the median interval between single hammers within each validation window was 15.2 s.
- Cost: 20 campaigns took 31.7 hours of wall-clock time in total, of which 6.1 hours were profiling hammering and 36 minutes were hammering within attack windows; the authors state that profiling can be done offline, and the remaining time is mainly spent restarting the engine and setting up requests for each attempt.
Cross-Framework and Defenses
- SGLang and Sonar: CD and RA were reproduced with Qwen2.5-1.5B-Instruct via software simulation; the Sonar maintainers independently reproduced it on the current main branch after disclosure. SGLang uses token-level mapping: with the FlashAttention backend, changing 1 entry is enough to redirect a 16-token page, while FlashInfer requires 16 entries; in the CD experiment, 8 changed entries were enough to leak the target diagnosis.
- Assignment validation defense: after disclosure, vLLM and Sonar each implemented patches that compare against an independent host-side record before use; the authors reviewed and evaluated both implementations, stating that the tested tampering was rejected before use and normal execution was unaffected, but the check incurs runtime overhead on the inference path.
- Serving-instance isolation: allocate separate instances and block pools for mutually untrusted tenants; the authors state this can prevent cross-tenant CD/RA, but sacrifices the efficiency of cross-tenant batching and cache reuse.
Other Ablations and Analysis
- Other block pairing results for CD: redirecting a content block to a chat template block collapses the reply to a single token and does not leak; redirecting a content block together with a template block produces a refusal; redirecting the template end block to Bob's content block leaks the diagnosis but degrades the reply (Section 5.2).
- Of the 70 flips observed in the block table, 68 were in the 0 → 1 direction, even though the two directions were close in proportion during profiling (346 0 → 1, 321 1 → 0); the authors attribute this to 0 → 1 more easily matching the layout under R2.
- Concurrent inference reduces the DRAM activation rate, so the authors pause the engine between each hammering interval; the paper does not test settings with longer hammering windows.
What are some points that can be further explored?
The authors list two limitations—block id prediction and GPU Rowhammer—and several future directions; the experiments cover 7 models, 3 frameworks, and a single DDR4 platform.
Limitations and future directions noted by the authors
- Block id prediction under noisy states (Section 7.1): once the allocator is fully used, Mallory cannot determine the target id from request history alone, and BlockJack degrades to a probabilistic, non-targeted attack; the authors did not measure this mode and state that it depends on deployment-specific pool occupancy and the number of co-resident requests containing sensitive information.
- Side-channel-assisted prediction (Section 7.1): side-channel observation of memory access behavior at service startup may help infer request activity and improve block id prediction, but the authors state that further experimental validation is needed.
- End-to-end GPU Rowhammer (Section 7.1): GPU Rowhammer remains an emerging hardware-specific primitive, studies cover only a limited set of GPU models and memory configurations, and GPUThor's ECC bypass implementation is not public; the authors leave an end-to-end GPU Rowhammer pipeline as future work.
- Cross-framework effectiveness evaluation (Section 5.4): evaluating the attack's effectiveness on SGLang/Sonar under more backend configurations and model families remains future work.
- Other service metadata (Section 7.2): metadata of prefix caching, KV cache offloading, and prefill–decode disaggregated services may also become targets; evaluating their feasibility and security impact is future work.
- Extensions of RA analysis (Section 5.3.2): future work may extend to model-specific semantic and safety behaviors, other application domains, and more scenario designs and outcome metrics.
Scope of experimental coverage
- The models tested are 7 across 4 families (1B–9B); the main platform is vLLM (MRV2/MRV1, GPU and CPU backends), and cross-framework experiments on SGLang and Sonar used only Qwen2.5-1.5B-Instruct to verify the mechanism (Section 5.4).
- RA evaluation covers 248 medical scenarios and 5 LLM reviewers; the topic-proximity experiment uses n = 100 per model; reviewers were screened via 700 calibration samples, and the paper does not report agreement between reviewers and human judgment.
- Physical experiments were conducted on a single DDR4 platform (i5-6400, a single 16 GiB DDR4-2133 module), the official vLLM 0.25.0 CPU version, and Llama-3.2-1B-Instruct, for a total of 20 90-minute campaigns (Sections 6.2, 6.5).
- The paper does not report the number of repetitions of software simulation experiments or a quantitative leakage rate for CD; CD results are reported as whether leakage occurred (Yes) (Table 2).
- Defense evaluation covers the assignment-validation patches of vLLM and Sonar respectively (the authors reviewed and tested tampering and normal mappings), as well as a discussion of instance isolation; the paper does not report runtime overhead numbers for the patches (Section 7.3.2).
Summarize the main content of the paper
BlockJack tampers with the paged KV cache block table to achieve cross-tenant leakage and tampering; 7 models can leak, the CDR in medical scenarios is 5.2%–41.1%, and it is validated via physical Rowhammer.
A fault injection attack paper targeting LLM service infrastructure, studying the address translation layer of the paged KV cache, an unexplored attack surface.
- Problem: Frameworks such as vLLM use a block table to map a request's logical KV blocks to physical blocks, determining which cached states each tenant reads; previous fault attacks only targeted weights or KV values.
- Method: BlockJack tampers with the block id of one block table entry: changing the attacker's entry makes her reply leak the victim's context (CD), changing the victim's entry makes his reply be guided by the attacker's context (RA); the authors formalize the predictability of the target block id under different allocator states, and implement a physical PoC with Rowhammer via the SWAGE framework.
- CD results: A single block id fault causes the victim's context to appear in the attacker's reply on all 7 models across the four families Qwen, Llama, Gemma, and Phi (Table 2).
- RA results: On 248 medical scenarios derived from ChatDoctor-HealthCareMagic-100k, the covert downgrade rate (CDR) is 5.2%–41.1% across 7 serving models × 5 LLM reviewers (Table 4); after switching to a different chief complaint, the relevance rate drops by 11.4%–19.4% while the downgrade rate changes by at most 1.7% (Table 3).
- Physical validation: On a DDR4 platform with the vLLM 0.25.0 CPU version, Rowhammer validated CD in 3/10 and RA in 8/10 campaigns; the block table page placement success rate is 11.9% (Table 5).
- Authors' conclusion: The authors state that the paged KV cache mapping is security-critical service metadata, and defenses should validate block table allocation or isolate instances between mutually distrusting tenants; after disclosure, vLLM and Sonar confirmed the vulnerability and proposed patches, which the authors reviewed and verified. Limitations include that under a fully used allocator state the attack degrades to probabilistic and non-targeted, and end-to-end GPU Rowhammer is left as future work.