Cybersecurity researchers have uncovered a new CPU-based side-channel attack, dubbed Branch Target Reuse (BTR), that allows attackers to steal the Linux root password hash from kernel memory. BTR is a variant of the well-known Spectre-v2 exploit and abuses stale CPU branch-prediction behavior, leaking sensitive data through speculative execution paths.
How BTR Works
The vulnerability arises when just-in-time (JIT) compilers—used heavily in the Linux kernel, web browsers, and language runtimes—free some executable memory and later reallocate it for new code. Although the new code may bear no relation to the old, the CPU’s branch target buffer (BTB) may still hold predictions referring to the previous — now-deleted — code.
An attacker can exploit these stale entries by training an indirect branch to a JIT-generated block, freeing that block, then causing the same memory region to be reused by different code. When the CPU uses the erroneous predictor and speculatively jumps to this new location, microarchitectural side-effects—like patterns in the CPU cache—reveal hidden bytes from kernel memory via what’s termed a “speculative execute-after-free” attack.
Proof-of-Concept and Impact
In demos involving Linux’s classic Berkeley Packet Filter (cBPF), Mozilla’s SpiderMonkey JS engine, and Oracle’s GraalVM, the researchers built two proof-of-concept (PoC) exploits targeting the Linux kernel’s cBPF JIT compiler. One of the PoCs worked even with cBPF constant blinding enabled. On modern Intel processors, arbitrary kernel memory could be leaked at roughly eight bytes per second.
During the Linux kernel experiment, an unprivileged local process first set up an indirect branch to a JIT-generated cBPF block, freed that block, then reused the same memory space for a different program. Leveraging stale branch predictions enabled by BTR, the attacker traced memory offsets and was able to recover sensitive data—including root’s password hash—once that data was resident in memory. On Raptor Cove CPUs, recovery took around three minutes on average; on Lion Cove chips, about five minutes.
Despite kernel hardening efforts, this attack bypassed existing mitigations on the tested configurations. However, it’s not a remote exploit: the attacker must already have local code execution privileges and the ability to manipulate JIT-compiled, executable memory regions.
Broader Risks and Mitigations
BTR affects any system where executable memory is frequently freed and reused—typical in JIT engines, but also relevant for classic BPF used in containers, seccomp filtering, socket filters, browser sandboxes, and packet processing. Even when unprivileged BPF use is limited, classic BPF remains widely deployed in various subsystem security layers.
To defend against BTR, Linux kernel developers have rolled out fixes under CVE-2026-64507 and CVE-2026-64508. These updates introduce an Indirect Branch Prediction Barrier (IBPB) that flushes stale branch predictions when reuse of JIT memory is detected. Administrators are urged to update the kernel, along with any deployed instances of browser engines and GraalVM. Sandboxing and limiting execution of untrusted local code are also key protective measures.
The discovery of BTR serves as a sharp reminder: speculative execution attacks continue to pose serious threats, even as many defenses are in place. While remote attacks via BTR aren’t feasible under current experiments, the necessity of local access still means attackers could use this as a stepping stone once inside. Organizations should treat this vulnerability as urgent: patching, ecosystem updates, and tightened policies around JIT memory use are the frontline defenses against this deep-rooted side-channel risk.