Here is the way I see it, and I could be totally wrong. The information is spread over a lot of sites and patches.Naib wrote:Will it? or will it just be the kernel? I would have thought it would just be the kernel that needs to be rebuild with the new speculative branching mitigation (ie poisoning it)NeddySeagoon wrote:That will be anotherwhen the new gcc is out.Code: Select all
emerge -e @world
To mitigate variant 2 you need to either recompile everything without indirect branches (retpolines solution) or update your kernel so it will flush the branch predictor on each context switch. Branch predictor flushing requires updated microcode. The needed microcode might be released but the upstream kernel support is not ready yet. Redhat and possible other vendors have rushed out patches already.
Retpolines doesn't work on recent intel cpus like Skylake so the only solution there is microcode. Intel said they released microcode update for cpus released within the last 5 year but what about older cpus? Unless there is a microcode update the only solution is retpolines afaik. Unfortunately rebuilding everything really means everything including the UEFI code. An attacker could play around with the branch predictor and then do something that causes UEFI to run. Since UEFI has access to all memory that could still leak everything.
Booting in legacy mode does not prevent UEFI from running but it might make it more difficult for an attacker to selectively run UEFI code. I'm not sure about that. Something else I'm not sure about is if the operating system can always guarantee that the branch predictor will be flushed before firmware code is run. When the operating system makes UEFI calls it can flush the branch predictor before but UEFI can also run because of obscure hardware interrupts. In that case you would need an update to the bios, not just microcode.
In any case the variant 2 is difficult to exploit. The attacker needs know the layout and some content of the address space it wants to attack. As gentoo users we are lucky because the code we run is mostly unique to our systems. The firmware code is something an attacker could easily get from the vendors website but the attacker would have to create a separate exploit for each mobo/bios version combo. That's a lot of work so I don't think most home users have a lot to fear from variant 2 if the retpolines workaround is used alone. In the future the attack might be improved so I can't tell how long this will be true.







