Re:What Spectre and Meltdown Mean for WebKit
by gpderetta on Tuesday January 09, 2018 @03:52AM
(#16104590)
That's basically a jump table. Still vulnerable to spectre (variant 2) without mitigations, btw.
Re:What Spectre and Meltdown Mean for WebKit
by fpoling on Tuesday January 09, 2018 @04:21AM
(#16104720)
It is even worse then switch/match statements. The jump tables can be used to train CPU to jump to a wide variety of addresses than switch/match statements so mounting a speculative execution attack is simpler.
---
Of course, you don't actually need this trick. If you put enough effort into it, you can essentially compile anything to c, after which you can just compile it with the movfuscator[1]
1: https://github.com/xoreaxeaxeax/movfuscator