IBPB, or Indirect Branch Predictor Barrier, is a CPU mitigation that flushes branch predictor state when execution crosses a security boundary. The goal is to stop one process, VM, or privilege level from influencing the speculative control flow of another through stale prediction entries such as BTB history.
This matters in Spectre-v2-style attacks because attackers can train indirect-branch predictors and later steer a victim into mis-speculated execution. IBPB is one of the defenses used to reduce that risk by clearing predictor state at context switches, kernel transitions, or other sensitive handoffs. In practice, it is often paired with other controls such as retpolines, IBRS, or STIBP, because no single mitigation covers every reuse pattern. In JIT-heavy workloads, where code is created and freed frequently, IBPB helps limit the chance that old branch history survives long enough to affect newly allocated code or a different security domain.


