Branch Privilege Injection: Exploiting branch predictor race conditions

comsec.ethz.ch

421 points by alberto-m a year ago


See also: ETH Zurich researchers discover new security vulnerability in Intel processors - https://ethz.ch/en/news-and-events/eth-news/news/2025/05/eth...

progval - a year ago

Researchers' blog post: https://comsec.ethz.ch/research/microarch/branch-privilege-i...

Paper: https://comsec.ethz.ch/wp-content/files/bprc_sec25.pdf

eigenform - a year ago

Great read! Some boiled-down takeaways:

- Predictor updates may be deferred until sometime after a branch retires. Makes sense, otherwise I guess you'd expect that branches would take longer to retire!

- Dispatch-serializing instructions don't stall the pipeline for pending updates to predictor state. Also makes sense, considering you've already made a distinction between "committing the result of the branch instruction" and "committing the result of the prediction".

- Privilege-changing instructions don't stall the pipeline for pending updates either. Also makes sense, but only if you can guarantee that the privilege level is consistent between making/committing a prediction. Otherwise, you might be creating a situation where predictions generated by code in one privilege level may be committed to state used in a different one?

Maybe this is hard because "current privilege level" is not a single unambiguous thing in the pipeline?

mettamage - a year ago

Good to see Kaveh Razavi, he used to teach at my uni in the Vrije Universiteit in Amsterdam :) The course Hardware Security was crazy cool and delved into stuff lijke this.

rakingleaves - a year ago

Anyone know how this relates to the Training Solo attack that was just disclosed? https://www.vusec.net/projects/training-solo/

rini17 - a year ago

If CPU brach predictor had bits of information readily available to check buffer boundaries and privilege level of the code, all this would be much easier to prevent. But apparently that will only happen when we pry out the void* from the cold C programmers' hands and start enriching our pointers with vital information.