However, there is one form of Spectre that is confounding --- when the attacker thread and the victim thread are one and the same. In this scenario, there is no way to flush the BTB/BPD between the attacker setting up the misdirection and the victim speculatively executing it.I contend in this scenario that we have a software bug --- the software is attempting to enforce its own domain protections and not leveraging the existing protection mechanisms provided by the hardware (think of a sandboxed JIT that is running untrusted code with supervisor permissions). In this scenario, any act of speculative (not just speculative cache allocations) leaks information.
So far, I have seen a few ideas that have been proposed:* allow SW to flush the BTB/BPD --- I'm not sure this will work as even a flushed BPD makes predictions, and a "not-taken" prediction is all that is required to force the leak.* allow SW to insert speculation fences --- I'm concerned this is only a temporary patch, as it only protects known gadgets from attacks.
* force SW to move protected information to a protected hw domain --- I'm not sure how tenable this is, particularly in the short-term. Long-term, I suspect this might be the likely end-game.
The nice thing about open-source is that somebody can perform attacks on an understood system, somebody else can make the changes to mitigate the attack, and a third person can verify the mitigation. =)
With speculative loads hindered in this way it is not necessary to
clear BTBs on privilege change, although it may be attractive as a
defense in depth.
There has been no response from anyone at Berkeley and noone has come forward from the RISCV Foundation to take responsibility for leading a critical speculation initiative.
Why?
fixing intra-process timing attacks clearly cannot be ignored. why is the BOOM Group ignoring the issue?
Thank you for sharing that paper.Abstract: "As a result of our work, we now believe that speculative vulnerabilities on today’s hardware defeat all language-enforced confidentiality with no known comprehensive software mitigations [...] In the face of this reality, we have shifted the security model of the Chrome web browser and V8 to process isolation."I think the paper reinforces my earlier assertion that I suspect the SW will have to hide private information behind HW protection, as it is difficult/impossible for SW to protect itself from itself.
Of course this upends everything (JIT, sandboxes, etc.).
And I still stand by the belief that speculation fences are a poor bandaid solution that will not catch all holes,
but I know many other people are pursuing this approach using extant hardware and I eagerly await their results! If that worked, it would be the easiest way out of this disaster by far.fixing intra-process timing attacks clearly cannot be ignored. why is the BOOM Group ignoring the issue?I don't know how you can leap from a lack of satisfactory email traffic to ignoring security.
We have already demonstrated spectre attacks on BOOM and open-sourced these efforts so that others can measure, extend, and attempt to mitigate the attacks. But solutions will not come quickly. We are excited for people to bring their own ideas and extend BOOM to test them out. If people have any questions about how BOOM works and how one might implement any particular mitigation strategy, then I think we can quickly give advice on a path forward. If people are looking for the One Correct Solution to all things Spectre, that will come much, much slower.