CVE-2026-64507: x86/bugs: Enable IBPB flush on BPF JIT allocation

Greg Kroah-Hartman <[email protected]> Sat, 25 Jul 2026 10:52:04 +0200
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026072554-CVE-2026-64507-5288@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

x86/bugs: Enable IBPB flush on BPF JIT allocation

Enable hardening against JIT spraying when Spectre-v2 mitigations are in
use. Specifically, issue an IBPB flush on BPF JIT memory reuse. Skip
enabling the IBPB flush if the BPF dispatcher is already using a retpoline
sequence.

This hardening applies only when BPF-JIT is in use. Guard the enabling
under CONFIG_BPF_JIT so that bugs.c still builds with CONFIG_BPF_JIT=n.

The Linux kernel CVE team has assigned CVE-2026-64507 to this issue.


Affected and fixed versions
===========================

	Fixed in 6.6.145 with commit cb27f3bf915cc0f20fc0c48da9059304e39ebd35
	Fixed in 6.12.97 with commit 9354248fc1c33a844ca1872761f6668b393e8c37
	Fixed in 6.18.39 with commit 8a4c8af9ae67eb072d90d1b339f14d27a82bd2a1
	Fixed in 7.1.4 with commit 52440e15d9628f8f239373c0f2e5e8f92feea2df
	Fixed in 7.2-rc2 with commit a3af84b0fa00ead01fcd0e28b5d773ff25990a0d

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2026-64507
will be updated if fixes are backported, please check that for the most
up to date information about this issue.


Affected files
==============

The file(s) affected by this issue are:
	arch/x86/include/asm/nospec-branch.h
	arch/x86/kernel/cpu/bugs.c


Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/cb27f3bf915cc0f20fc0c48da9059304e39ebd35
	https://git.kernel.org/stable/c/9354248fc1c33a844ca1872761f6668b393e8c37
	https://git.kernel.org/stable/c/8a4c8af9ae67eb072d90d1b339f14d27a82bd2a1
	https://git.kernel.org/stable/c/52440e15d9628f8f239373c0f2e5e8f92feea2df
	https://git.kernel.org/stable/c/a3af84b0fa00ead01fcd0e28b5d773ff25990a0d