Oo7: Low-Overhead Defense Against Spectre Attacks
arxiv.org
arxiv.org
Maybe I missed it but how much padding is needed? Depending on how much, surely that isn't too bad of a compromise? Also wouldn't you have to randomise the amount of padding needed?
For the other methods the ~2% figure in performance loss also seems pretty decent.
I'm thinking a few thoughts:
- Interpreted programs can carry out Spectre attacks
- Interpreted programs are un-analysable using a technique that does binary analysis
- This technique would insert fences "everywhere" in an interpreter, adding significant overhead
[edit]I'm thinking it matters a lot whether the analysis is done at run-time or static. If the analysis is static, and it was done on the Python interpreter for instance, it would have to be very pessimistic. But if it's done at run-time, it might not need to insert as many "fences".
I don't know how oo7 works (I have admittedly gone straight to the comments on this one ;) ) but I do suspect it would be quite the ask (read: NP-hard) to expect it to identify interpreter{s, hot paths}.
However, if it's a JITing interpreter, that's technically compilation, and now the question is, how long does oo7 take to do its thing, and can it fit within JIT passes?
(NB. For clarity, choice of interpreter code architecture (bytecode vs anything else) is not especially orthogonal here, but the meaning is no less clear.)
I would guess that any program, whether interpreted or compiled, that is capable (again, either intentionally or through a bug) of generating instruction sequences and then having them executed, could be used to exploit Spectre. This would include any program capable of writing a binary file and then running it as a process or dynamically loading it as a library or native-code extension, if allowed to do so by the OS.
https://arxiv.org/pdf/1703.07706.pdf
https://pdfs.semanticscholar.org/6aa3/18e95cae5a932e330857e5...