Why Kernel Exploits Crash and Burn

▶ Watch (01:05)

Kernel exploits that crash the machine leave forensic artifacts in kernel locks and burn the zero-day that caused them. Modern exploitation chains require two problems solved in sequence: find the exact address of a target kernel object (where to write), then convert a limited write primitive into something arbitrary (what to write). Both steps rely on location guessing, and wrong guesses crash the system.

Lukas Maar and Lukas Giner set out to solve both problems reliably. Their goal: make the kernel tell you exactly where the objects are, then chain that disclosure with a known limited primitive to reach arbitrary physical read/write without a single crash.

The TLB Side Channel Mechanics

▶ Watch (05:39)

Virtual address translation goes through five page table lookups per access. CPUs avoid that overhead with a TLB (translation lookaside buffer): a 256-set cache storing recent virtual-to-physical mappings. A cache hit takes a few cycles; a miss takes the full table walk.

The prefetch instruction hints to the CPU to load an address into cache without architecturally accessing it, so it never faults even for kernel addresses. Timing a prefetch against a kernel address reveals whether that page has recently been accessed. The evict-and-reload technique clears the TLB set using addresses whose XOR matches the target set index, then measures again, producing a clean signal each round.

“reliable and stable kernel exploitation” — Lukas Maar

Narrowing Location Disclosure from 2MB to 4KB

▶ Watch (10:42)

The basic TLB channel leaks 2MB-aligned kernel region bases. Most slab-allocated objects live on 2MB pages, which is not precise enough for exploitation. Three kernel defenses inadvertently solve this: CONFIG_VMAP_STACK moves kernel stacks to vmalloc, which already uses 4KB pages; slab_virt virtualizes the heap at 4KB granularity; and strict module permission enforcement forces the kernel to split 2MB DPM pages wherever a module is loaded, producing 4KB-aligned boundaries near the target objects.

“That’s a good point. We use SIS calls.” — Lukas Maar

Syscalls that access known kernel objects create distinct TLB patterns. Three syscall calls against message objects on the same page create overlapping hit sets; the intersection minus a control call isolates the 4KB page holding the target. The team evaluated this against 900+ pages accessed per syscall by using three-set intersection logic and slab heap massaging to pack attacker-controlled objects onto a single target page.

Building Arbitrary Read/Write from Limited Primitives

▶ Watch (20:24)

The unlink primitive writes two attacker-controlled values to two attacker-controlled addresses — a cross-write. Redirecting a pipe buffer’s page reference to the slab page holding other pipe buffer metadata converts this into arbitrary physical read/write: write to pipe buffer zero to change pipe buffer one’s page pointer to any target page, then issue a read or write syscall on pipe buffer one.

The live exploit demo on the conference machine (24:19) leaked vmemap, the direct physical map, and code base addresses in seconds on a fully patched kernel, massaged the heap, and escalated privileges live. Evaluated on Linux 5.15, 6.5, and 6.8 across Intel, AMD, and ARM CPUs. All leaked objects, including kernel stack, message objects, credentials, file structures, and pipe buffers, were confirmed at 4KB precision.

Notable Quotes

reliable and stable kernel exploitation Lukas Maar · ▶ 0:37

That’s a good point. We use SIS calls. Lukas Maar · ▶ 14:44

Maybe our talk was very clear. Lukas Giner · ▶ 28:06

Key Takeaways

  • A prefetch-based TLB side channel leaks 4KB-aligned kernel object addresses without triggering access faults.
  • Kernel defenses like CONFIG_VMAP_STACK and strict module permissions split pages, inadvertently sharpening attacker precision.
  • Chaining location disclosure with an unlink primitive and pipe buffer self-reference produces reliable arbitrary physical read/write.