PhantomFetch: Obfuscating Loads against Prefetcher Side-Channel Attacks

Xingzhi Zhang, Buyi Lv, Yimin Lu, Kai Bu · 2025

Read PhantomFetch: Obfuscating Loads against Prefetcher Side-Channel Attacks by Xingzhi Zhang, Buyi Lv, Yimin Lu, Kai Bu (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-05110.txt.

Introduction

Xingzhi Zhang and co-authors present PhantomFetch, a defense against side-channel attacks that abuse a chip's IP-stride prefetcher. The prefetcher loads data ahead of need for speed, but attackers can train it to leak secrets tied to a victim's loads.

Past defenses change hardware, which costs money and misses chips already sold. PhantomFetch needs no new hardware. It blurs the mark that secret-linked loads leave on the prefetcher, which breaks the link attackers ride. Tests check that the defense keeps most of the speed gain from prefetching while it blocks the leak path.

Catalog record

CREATORXingzhi Zhang, Buyi Lv, Yimin Lu, Kai Bu
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE31 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2511-05110

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

PhantomFetch: Obfuscating Loads against Prefetcher Side-Channel Attacks Xingzhi Zhang, Buyi Lv, Yimin Lu, Kai Bu Abstract The IP-stride prefetcher has recently been exploited to leak secrets through side-channel attacks. It, however, cannot be simply disabled for security with prefetching speedup as a sacrifice. The state-of-the-art defense tries to retain the prefetching effect by hardware modification. In this paper, we present PhantomFetch as the first prefetching-retentive and hardware-agnostic defense. It avoids potential remanufacturing cost and enriches applicability to off-the-shelf devices. The key idea is to directly break the exploitable coupling between trained prefetcher entries and the victim’s secret-dependent loads by obfuscating the sensitive load effects of the victim. The experiment results show that PhantomFetch can secure the IP-stride prefetcher with only negligible overhead. I Introduction Prefetcher side-channel attacks [ 6 , 18 , 4 , 16 , 21 , 13 ] have recently evolved to leak secrets without relying on primitives for cache side channels [ 3 ] . Such attacks exploit the IP-stride prefetcher on modern processors. This prefetcher provides performance speedup by ❶ learning repetitive strides between memory addresses requested by load instructions with identical least significant bits in instruction pointers (IPs), ❷ prefetching data addressed by the sum of the learned stride to the current requested address, and ❸ avoiding potential cache misses of the prefetched data [ 9 ] . All processes on the same core can share the IP-stride prefetcher, opening the door for side-channel attacks. Specifically, the attacker process trains prefetcher entries using loads that have the identical least significant bits in IPs with that of the secret-dependent loads by the victim process [ 3 ] . Then any secret-dependent load from the victim may prefetch data in the attacker process’ address space. Ultimately, the attacker process can correctly infer the victim’s secret based on the fact that the prefetched data can already be hit in the cache upon the first request by the attacker process. The existing defenses, however, fail to simultaneously satisfy prefetching retention and hardware agnosticism. For example, a line of defenses simply disables the prefetcher [ 1 , 3 , 17 ] . This is absolutely effective against any side-channel attack that exploits prefetching. However, the IP-stride prefetcher may be simply disabled in practice because prefetching can yield up to 98% speedup [ 2 , 20 , 19 ] . The latest defense [ 3 ] modifies hardware logic to flush prefetcher entries upon context switches such that trained prefetching effect is obscured across processes. However, the required hardware modification may lead to diseconomy of remanufacturing cost and inapplicability to off-the-shelf devices. In this paper, we present PhantomFetch suites as the first prefetching-retentive and hardware-agnostic defense against IP-stride–prefetcher side-channel attacks. The key idea is to obfuscate the impact of the victim’s secret-dependent loads on prefetching effect. We explore two run-time load obfuscation schemes. One is load injection, which injects a set of well-crafted loads to erase trained prefetcher entries by the victim before any other process can access and exploit these entries. The other is load relocation, which randomly swaps locations of the victim’s secret-dependent loads such that the same trained prefetcher entry could couple with any secret-dependent load. We design and implement two variants, PhantomFetch-vLI and PhantomFetch-vLR, to practice load injection and load relocation, respectively. PhantomFetch-vLI modifies kernel function context_switch by leading it with non-preemptive execution of our crafted loads. We leverage the fact that load IPs with the same 8 least significant bits match the same prefetcher entry [ 3 ] to craft loads for injection. A two-round load injection strategy is developed to ensure the complete obscurity of prefetcher entries trained by the victim upon context switches. Furthermore, PhantomFetch-vLR provides a compiler-oriented alternative for scenarios where kernel modification might not be permitted. It enables the compiler to instrument the victim program with a load-relocation gadget. The instrumented program can extract and relocate secret-dependent if-blocks and else-blocks, through a randomization process, at run time. In summary, we make the following major contributions to secure IP-stride prefetcher without hardware modification. • We investigate the state-of-the-art defenses against IP-stride–prefetcher side-channel attacks (Section II ). We identify their fundamental lack of simultaneous satisfaction of prefetching retention and hardware agnosticism. This prevents them from retaining the prefetching effect while readily applying it to off-the-shelf devices. • We present PhantomFetch-vLI and PhantomFetch-vLR as the first prefetching-retentive and hardware-agnostic defenses (Section III ). Their core idea is load obfuscation, which can obscure exploitable secret-dependent prefetching effect trained by the victim at run time. • We implement and evaluate PhantomFetch-vLI and PhantomFetch-vLR with representative test cases (Section IV ). The results show that PhantomFetch-vLI and PhantomFetch-vLR can secure the IP-stride prefetcher with only 0.6% slowdown and 4.0% slowdown, respectively. II Problem In this section, we first review the latest prefetcher side-channel attack that no longer relies on primitives for traditional cache side channels. We then investigate existing defenses and identify their limitation on simultaneously attaining both prefetching retention and hardware agnosticism. II-A Prefetcher Side-Channel Attack Most existing prefetcher side-channel attacks [ 6 , 18 , 4 , 16 , 21 , 13 ] still have to rely on cache side channels to ultimately induce information leakage [ 3 ] . A common rationale of them exploits the cache-status variation by prefetched data. Such cache-status variation leaks information through various cache side-channel attacks [ 22 , 7 , 8 , 14 , 15 ] . However, after almost 20 years of the emergence of cache side-channel attacks [ 15 ] , a plethora of secure cache designs have already been practiced [ 11 ] . The closing of cache side channels further throttles prefetcher side channels that build upon them otherwise. The latest prefetcher side-channel attack can leak information even if primitives for cache side channels are prohibited. One such representative is the AfterImage attack [ 3 ] (Figure 1 ). It infers the victim’s secret from how the victim’s secret-dependent load operations affect the IP-stride prefetcher, which further affects the attacker’s own cache access trace. It does not depend on the specific cache access trace of the victim as in cache side-channel attacks. Step 1: Train prefetcher. The attacker starts with training certain prefetcher entries such that their IP fields can match the addresses of secret-dependent loads by the victim. Specifically, the IP field of a prefetcher entry matches only the least significant 8 bits of a load instruction’s address. This greatly eases identification of the IPs of exploitable loads. Even if the victim does not belong to a shared library 1 1 1 When the victim code belongs to a shared library, the attacker can determine the IPs of loads therein using disassembly tools such as objdump . , the attacker only needs to exercise up to 256 possibilities for quickly determining the exact lowest 8 bits of a target load [ 3 ] . The attacker then trains two prefetcher entries in particular—one matches a load from the if-path of the victim code and the other matches another load from the else-path of the victim code. The stride field in a prefetcher entry records the distance between the memory addresses of the data requested in two consecutive loads. The prefetcher will update the value

Read the complete text