Earlier quoted context omitted.
What I don't understand is how the branch predictor is even exploitable from JavaScript -- it doesn't have pointers. How can it "request" arbitrary memory locations and time the results?
It has byte arrays and indexing on those which is equivalent to having pointers. See page 6 and 7 of the Spectre paper.
Reading privileged memory with a side-channel
611–620 of 639 posts
Re: Reading privileged memory with a side-channel
#612Websites like the Guardian report that this is now the case but I don't understand how that's possible.
Re: Reading privileged memory with a side-channel
#613Earlier quoted context omitted.
Only on Intel. Others restrict prefetches on permissions. I think this might even be fixed by microcode patches on Intel, at least os specific, looking at the first address bit.
If they could have done microcode patches they would have done, suggesting they can't.
I guess Intel only focused on Windows NT for several months, and there it's not so easy as on Linux.
Re: Reading privileged memory with a side-channel
#614Can someone show me an example of JavaScript code running in a browser that would display a password stored in kernel space? Websites like the Guardian report that this is now the case but I don't understand how that's possible.
Re: Reading privileged memory with a side-channel
#615Can someone show me an example of JavaScript code running in a browser that would display a password stored in kernel space? Websites like the Guardian report that this is now the case but I don't understand how that's possible.
The kernel maps itself into the address space of each process as an optimization to increase the performance of system calls. So yes, it is possible.
Re: Reading privileged memory with a side-channel
#616Earlier quoted context omitted.
I've thrown the C code in the Spectre paper up if anyone wants to feel the magic: https://gist.github.com/ErikAugust/724d4a969fb2c6ae1bbd7b2a9...
I thought it was supposed to be exploitable by javascript? If you can get to the machine and run c code, well, that doesn't seem like an exploit?
Re: Reading privileged memory with a side-channel
#617Earlier quoted context omitted.
I've thrown the C code in the Spectre paper up if anyone wants to feel the magic: https://gist.github.com/ErikAugust/724d4a969fb2c6ae1bbd7b2a9...
I thought it was supposed to be exploitable by javascript? If you can get to the machine and run c code, well, that doesn't seem like an exploit?
The Javascript case is the main one that makes it remotely exploitable.
Re: Reading privileged memory with a side-channel
#618Earlier quoted context omitted.
> New CPU microcode is enough What would that entail? Disabling speculation completely? Disabling memory accesses during speculation?
Disabling indirect branch prediction (and thus speculation after indirect branches) while in kernel mode, or flushing the indirect branch predictor on kernel mode entry. Both need OS support in addition to the microcode, but the change is less invasive than PTI.
Re: Reading privileged memory with a side-channel
#619Earlier quoted context omitted.
> For variant 1, a kernel JIT is definitely helpful, which is why the Project Zero PoC used it, but it's not required. If I'm understanding the post correctly it says that JIT's not required for Intel CPUs, but is required for AMD.
Their particular exploit for variant 1, which uses eBPF, only worked on AMD with the eBPF JIT, i.e. it did not work with the eBPF interpreter. But there are many other potential avenues to exploit that variant which have nothing to do with BPF. The result does suggest that it may generally be harder to trigger variant 1 on AMD processors (because they doesn't speculate as much?), but harder ≠ impossible.
Re: Reading privileged memory with a side-channel
#620An analogy that was useful for explaining part of this to my (non-technical) father. Maybe others will find it helpful as well. Imagine that you want to know whether someone has checked out a particular library book. The library refuses to give you access to their records and does not keep a slip inside the front cover. You can only see the record of which books you have checked out. What you do is follow the person…