BitBootcampBitBootcamp ← all explainers 🔄 Review ⚙ Settings

PAPERS-12-005 · Paper — Meltdown — Reading Kernel Memory from User Space

The paper

The paper "Meltdown — Reading Kernel Memory from User Space" introduced a groundbreaking side‑channel attack that shattered the long‑standing belief that user programs could never read kernel memory, establishing a new era of transient‑execution vulnerabilities.

Before this paper

Before Meltdown, operating systems relied on a hard rule enforced by the CPU: user programs simply cannot read kernel memory. This boundary was assumed absolute, so kernel data was mapped into every process for speed. The community believed the hardware permission checks were enough to keep user and kernel spaces isolated. As a result, many systems were designed without defending against microarchitectural leaks.

The key idea

The key insight of Meltdown is that modern CPUs execute instructions out of order for performance, and they may briefly act on data from a forbidden address before the permission check catches up. That speculative action leaves a measurable trace in the cache, even though the illegal read is later discarded. By observing the cache state, an attacker can infer the secret data that was never supposed to be visible.

How it works

The attack starts by forcing the CPU to speculatively read a byte from kernel memory that the process is not allowed to access. While the speculative execution is in progress, the CPU uses that secret byte as an index into a user‑controlled array, causing one specific cache line to be loaded. The illegal access then triggers a fault, and the architectural state is rolled back, so the secret byte never reaches the program. However, the cache line remains hot. The attacker then measures the access time to each array entry; the fast‑access entry reveals which cache line was loaded, thus revealing the secret byte. By repeating this sequence for successive bytes, the attacker can reconstruct kernel memory byte by byte, achieving leakage rates of kilobytes per second.

See it — leaking through the cache

flowchart TD
  A["Read forbidden<br/>kernel byte"] --> B["Out-of-order CPU<br/>uses it transiently"]
  B --> C["Touches a cache<br/>line based on value"]
  C --> D["Fault undoes it —<br/>but cache timing leaks"]

What they showed

The researchers demonstrated that Meltdown could read arbitrary kernel and physical memory from an unprivileged process, leaking data at kilobytes per second. It affected most Intel processors produced for two decades, showing the vulnerability was widespread and severe.

What it changed

Meltdown forced operating systems to adopt kernel page‑table isolation (KPTI), fully separating kernel and user address spaces. This mitigation is now standard in every patched OS and has made microarchitectural side channels a first‑class security concern. The paper sparked a wave of research into transient‑execution attacks and defensive techniques. Next: Spectre.

The one-line takeaway

Speculative execution can betray security boundaries, turning a performance feature into a powerful side‑channel leak.

Read it / meet it

Reading the original Meltdown paper gives you a clear view of how a subtle timing effect can break fundamental isolation. Its legacy lives on in today’s OS kernels, which all include KPTI and continue to evolve defenses against transient‑execution attacks.