Speculation Attacks Using the Return Stack Buffer
arxiv.org
arxiv.org
Wow, I had assumed that retpoline was a heavy hammer that we could use to squash this class of bugs until new hardware designs arrive.
…In the long run, we believe that these patches are ad hoc and that new attack vectors will continue to emerge. Current systems are fundamentally insecure un- less speculation is disabled. However, we believe that it is possible to design future generations of CPUs that re- tain speculation but also close speculative leakage chan- nels, for example by keeping speculative data in separate CPU structures than committed data.
Of course some of those side channels are issues in sensitive code regardless of speculative execution... but there seems to be an interesting place where the two overlap. How do you fix that?
Kind of. Linux, like every x86 kernel, puts some kernel memory in the userspace page tables. But it’s marked with a bit saying “no userspace access”. Meltdown-affected CPUs don’t do a very good job of respecting that bit.
> ...in order to reduce the overhead of context switches.
It’s done because it’s required. When a system call happens, for example, the CPU starts executing kernel code. That code must be mapped in memory.
Core A and V are cache-coherant. Attacker sets up the cache in core A such that its state will be affected based on the victim's speculation on core V. A speculative write on V to a line that is present in A produces a state change that is visible to A.
There's no way you're going to see speculation rollback across cores.