0
I thought I'd write down the proof-of-concept to see if I got it right.
So the Meltdown paper lists the following steps:
; flush cache ; rcx = kernel address ; rbx = probe array retry: mov al, byte [rcx] shl rax, 0xc jz retry mov rbx, qword [rbx + rax] ; measure which of 256 cachelines were accessedSo the first step is to flush the cache, so that none of the 256 possible cache lines in our "probe array" are in the cache. There are many ways this can be done.
Now pick a byte of secret kernel memory to read. Presumably, we'll just read all of memory, one byte at a time. The address of this byte is in
rcx.
Now execute the instruction:
mov al, byte [rcx]This line of code will crash (raise an exception). That's because
[rcx] points to secret kernel memory which we don't have permission to read. The value of the real
al (the low-order byte of
rax) will never actually change.
But fear not! Intel is massively out-of-order. That means before the exception happens, it will
provisionally and
partially execute the following instructions. While Intel has only 16
Continue reading