Compiling the kernel without KVM virtualization support was enough to leave the protection against Branch History Injection disabled, even though the attack vectors remained open on the same machine. The flaw was detected by Breno Leitao, a Debian developer, and the x86 fixes submission of November 8, 2026 corrects it before Linux 7.4-rc2 was released. The affected configurations were not exotic: the mitigation was not applied as required on many generations of Intel processors and on certain ARM and AMD CPUs.
BHI belongs to the speculative execution family and inherits the lineage of Spectre, the vulnerability that in 2018 forced half the kernel to be redesigned. The processor keeps a branch history to guess where the code will go next, and that history can be poisoned from an unprivileged process so that the prediction ends up jumping to a kernel fragment that leaks memory. The mitigation has existed since 2022 and costs performance, so the kernel enables it only when it needs it.
The problem was not a new hole or a hardware flaw. It was a badly written condition in the function that chooses which mitigation applies, and the effect is awkward: two identical kernels on the same processor can end up with different levels of protection depending on how they were compiled. The fix makes the choice depend on the vectors that remain open.
What is BHI mitigation and why does it still matter?
The idea behind BHI is awkward because it does not depend on a specific error in the code. It depends on how the processor decides, before it knows, what the next instruction it executes will be.
The branch history buffer (BHB) is a buffer where the processor records the pattern of recent jumps to anticipate the destination of an indirect call. If an attacker with local execution manages to write to that history, they can push the prediction toward an address that suits them, and that address is executed speculatively with kernel privileges. The result is the usual one in this family: the data is not read, it is inferred by measuring how long it takes to reach the cache.
The mitigation comes in two forms. One is hardware, with the BHI_DIS_S bit that turns off speculation on that history; the other is a software loop that clears the BHB on every transition between modes. The kernel documents both in the BHI mitigation and only resorts to the second when the processor does not offer the first.
The error: the mitigation turned itself off without KVM
The bhi_select_mitigation() function made the decision with a single piece of data: whether the guest-to-host vector was enabled. When it was not, it chose BHI_MITIGATION_OFF and consulted nothing else, neither the processor's capabilities nor the rest of the open vectors.
And it was not enabled on many machines. In a kernel compiled without KVM, the CPU_MITIGATE_GUEST_HOST flag starts off because there are no guests capable of attacking the host, so the protection was left out even on machines where a normal process could launch the attack from user space. Leitao summed it up in his explanation of the patch: those kernels lose BHI_DIS_S or the BHB clearing loop by default, and booting with mitigations=auto,no_guest_host produces the same effect.
The detail that turns the case into more than an anecdote is the asymmetry. The guest-to-host vector disappears without KVM, but the user-to-kernel vector remains, and it is precisely the one that the kernel documentation also associates with this technique.
The fix went into the x86 fixes batch merged before Linux 7.4-rc2, which arrived on November 8, 2026, and its maintainers marked it for backporting to the supported stable kernels since 2022, when this mitigation landed in the main tree. No one has to wait for version 7.4 if their distribution carries stable patches.
User to kernel and guest to host: the documentation the code contradicted
The kernel's vector table indicates which protections are needed for each attack path. BHI appears in two columns and the code only looked at one. That gap between what is written and what is executed is the entire flaw, with nothing else behind it.
User to kernel is the textbook attack: an unprivileged program triggers a mispredicted indirect jump and the processor speculatively executes kernel code with data it should not see. Guest to host is the hypervisor version, where a virtual machine poisons the history and the prediction goes astray inside the host. The attack vector table lists both scenarios under BHI since the mechanism was documented.
On a server without KVM the second vector does not exist, and that is where the function's original logic came from. The error was assuming that the absence of one implied the absence of the other. Leitao framed it as an inconsistency between the documentation and the code, and that is the correct description: a mitigation was not missing, a condition was.
Which CPUs are affected and how do you know if your kernel applies it?
The scope depends on the silicon. Intel contributes many affected generations, and the list also includes some ARM processors and certain AMD chips that share the same weakness in the branch history.
On Intel, both forms of protection coexist: chips that expose BHI_DIS_S solve the problem in hardware, and those that do not rely on the software loop that this patch reactivates. That difference is what makes the flaw tangible for anyone administering servers that are a few years old, because those are precisely the machines where software mitigation is the only option available and where the kernel was turning it off.
| BHI value in spectre_v2 |
What it means |
| BHI: Not affected |
The processor is not vulnerable |
| BHI: BHI_DIS_S |
The hardware turns off speculation on the history |
| BHI: SW loop |
The kernel clears the BHB with a software loop |
| BHI: Vulnerable |
No protection is active |
The check fits in a single command. The file /sys/devices/system/cpu/vulnerabilities/spectre_v2 returns a BHI line with the machine's real status, and there you can see whether the kernel applies BHI_DIS_S, the software loop or neither. It is also worth knowing that the spectre_bhi= parameter on the boot line allows the decision to be forced, although that is rarely the recommended route.
If the value says Vulnerable on a desktop machine with a 2019 processor, the likely cause is the kernel configuration and not the silicon. Updating the distribution package should be enough once the patch lands in each project's stable branch.
The technical debt of speculative mitigations
Every vulnerability of this type leaves behind a layer of conditional code that stays forever, because the installed base of processors does not retire at the pace of the patches. Spectre became public in January 2018 and the kernel is still carrying code of that kind.
The result is a matrix of configurations that nobody tests in full. BHI support depends on a compilation option that in turn requires Intel CPU support, and on top of that it interacts with KVM, with vector controls and with boot parameters. A flaw like this does not show up in a unit test; it shows up when someone compares the code with the documentation and discovers that the two do not say the same thing. The avalanche of CVEs hitting the kernel makes those comparisons increasingly costly.
The other half of the problem is timing. A patch in the main tree takes time to reach the distributions, and that is where the case of CVE-2026-98432 comes in, which remained unpatched in Ubuntu and RHEL weeks after becoming public. With BHI the risk is lower because local execution is required, but the lesson about adoption times repeats all the same.
The tree does not help slow things down either. The Linux 7.4 merge window was the largest in history, and each cycle adds code that must then also be reviewed from a security standpoint. The fact that a Debian developer found this condition says less about carelessness and more about the sheer size of what is being maintained.
The fix is small and the effect is large, which is usually the best kind of patch. It is also a reminder that the security of speculative execution is not solved with an announcement, but by periodically checking whether the code still does what the documentation promises.