Ramblings of an aging IT geek
← Ramblings of an aging IT geek
news

when the bug is in the silicon

Reacting to the Meltdown and Spectre disclosures, and why a vulnerability in the CPU itself feels different from the usual patch-and-move-on.

A city skyline at dusk

Most security weeks are interchangeable. A library has a flaw, you bump a version, you redeploy, you forget about it by Friday. The disclosures that landed at the start of this month are not that, and the reason they've dominated every channel I read is simple: the bug isn't in the software. It's in the processor.

Meltdown and Spectre, published a few days into January, exploit speculative execution: the trick where a CPU guesses which way a branch will go and runs ahead before it knows for sure. It's been a cornerstone of fast chips for two decades. Turns out the guessing leaves traces in the cache, and with enough patience you can read those traces to recover memory you were never supposed to see. Across process boundaries. Across the kernel boundary. In some forms, from inside a browser tab.

What's chastening is how old it is. This isn't a regression somebody introduced last year. It's been sitting in shipped silicon since roughly 2010, in chips from more than one vendor, doing exactly what it was designed to do. Nobody slipped up. The optimisation was correct and the security model assumed it didn't leak. That assumption was wrong the whole time, and nobody noticed for years.

A long view across rooftops

The practical side has eaten my week. The Meltdown mitigation, kernel page-table isolation, is the kind of thing you cannot just wave through. Separating the kernel and user page tables means a tax on every syscall, and the size of that tax depends entirely on what your workload does. I spent two days measuring rather than guessing. Our syscall-light services barely flinched. The one chatty service that hammers the kernel for small reads took a double-digit hit, which is a genuinely unpleasant number to read off a graph and then have to explain to people.

Spectre is the one that worries me more, and it's the one with no tidy ending. Meltdown has a clean mitigation you can deploy and tick off. Spectre is a class of attacks, not a single bug, and the early fixes are partial: microcode updates, compiler changes, browser patches that deliberately make timers fuzzier so the side channel is harder to read. We will be living with variants of this for years. You cannot recall every CPU on earth, so the answer is layers of awkward software working around a hardware assumption that can't be unmade.

If there's a lesson I'm taking, it's humility about abstractions. We build on the idea that a process is isolated, that the kernel is a wall, that the hardware underneath is a faithful machine that does what the manual says and nothing more. Mostly it is. But the manual describes the architecture, not the implementation, and this month the implementation leaked through. The researchers who found it deserve a great deal of credit, and the coordinated disclosure, though it slipped out a bit early, was handled about as well as something this enormous could be.

For now: patch the kernels, update the microcode where vendors have shipped it, update the browsers, measure your own workloads rather than trusting anyone's headline benchmark, and accept that the ground you're standing on is slightly less solid than you thought on the 1st of January.