In the Linux kernel, the following vulnerability has been resolved:
x86/mm: Eliminate window where TLB flushes may be inadvertently skipped
tl;dr: There is a window in the mm switching code where the new CR3 is set and the CPU should be getting TLB flushes for the new mm. But should_flush_tlb() has a bug and suppresses the flush. Fix it by widening the window where should_flush_tlb() sends an IPI.
Long Version:
=== History ===
There were a few things leading up to this.
First, updating mm_cpumask() was observed to be too expensive, so it was made lazier. But being lazy caused too many unnecessary IPIs to CPUs due to the now-lazy mm_cpumask(). So code was added to cull mm_cpumask() periodically[2]. But that culling was a bit too aggressive and skipped sending TLB flushes to CPUs that need them. So here we are again.
=== Problem ===
The too-aggressive code in should_flush_tlb() strikes in this window:
// Turn on IPIs for this CPU/mm combination, but only // if should_flush_tlb() agrees: cpumask_set_cpu(cpu, mm_cpumask(next));
next_tlb_gen = atomic64_read(&next->context.tlb_gen); choose_new_asid(next, next_tlb_gen, &new_asid, &need_flush); load_new_mm_cr3(need_flush); // ^ After 'need_flush' is set to false, IPIs *MUST* // be sent to this CPU and not be ignored.
this_cpu_write(cpu_tlbstate.loaded_mm, next); // ^ Not until this point does should_flush_tlb() // become true!
should_flush_tlb() will suppress TLB flushes between load_new_mm_cr3() and writing to 'loaded_mm', which is a window where they should not be suppressed. Whoops.
=== Solution ===
Thankfully, the fuzzy "just about to write CR3" window is already marked with loaded_mm==LOADED_MM_SWITCHING. Simply checking for that state in should_flush_tlb() is sufficient to ensure that the CPU is targeted with an IPI.
This will cause more TLB flush IPIs. But the window is relatively small and I do not expect this to cause any kind of measurable performance impact.
Update the comment where LOADED_MM_SWITCHING is written since it grew yet another user.
Peter Z also raised a concern that should_flush_tlb() might not observe 'loaded_mm' and 'is_lazy' in the same order that switch_mm_irqs_off() writes them. Add a barrier to ensure that they are observed in the order they are written.
CVSS Details
- CVSS 3.1 Base Score: 7.8
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon Linux Ami 2 | — | Upgrade kernel-debuginfo-common-x86_64Upgrade python-perf-debuginfoUpgrade python-perfUpgrade kernel-livepatch-5.15.184-125.190Upgrade bpftool-debuginfoUpgrade kernel-toolsUpgrade kernel-develUpgrade kernelUpgrade kernel-headersUpgrade perf-debuginfoUpgrade kernel-debuginfo-common-aarch64Upgrade kernel-livepatch-5.15.184-125.189Upgrade bpftoolUpgrade kernel-debuginfoUpgrade perfUpgrade kernel-tools-develUpgrade kernel-tools-debuginfo | May 20, 2026 | May 20, 2026 |
| Amazon_linux_2023 | — | Upgrade kernel6.12-debuginfoUpgrade kernel6.12-debuginfo-common-aarch64Upgrade perf-debuginfoUpgrade kernel6.12-modules-extraUpgrade kernel6.12-debuginfo-common-x86_64Upgrade kernelUpgrade kernel-debuginfoUpgrade perf6.12Upgrade kernel-libbpf-develUpgrade kernel-debuginfo-common-x86_64Upgrade kernel-livepatch-6.12.29-33.102Upgrade kernel6.12Upgrade kernel-headersUpgrade kernel-libbpfUpgrade kernel-modules-extraUpgrade kernel-modules-extra-commonUpgrade kernel-livepatch-6.1.140-154.222Upgrade kernel-libbpf-staticUpgrade kernel-debuginfo-common-aarch64Upgrade kernel-develUpgrade python3-perf6.12Upgrade perf6.12-debuginfoUpgrade kernel-tools-debuginfoUpgrade kernel-toolsUpgrade python3-perfUpgrade kernel-tools-develUpgrade kernel-libbpf-debuginfoUpgrade bpftool-debuginfoUpgrade python3-perf6.12-debuginfoUpgrade python3-perf-debuginfoUpgrade bpftoolUpgrade perf | Jul 11, 2025 | May 20, 2025 |
| Debian | — | Upgrade linuxUpgrade linux-6.1 | May 28, 2025 | May 20, 2025 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | May 20, 2025 |
| Ubuntu | — | Upgrade linux-image-lowlatency-64k-5.15Upgrade linux-image-oracleUpgrade linux-image-5.15.0-1082-nvidia-lowlatencyUpgrade linux-image-6.14.0-1010-azureUpgrade linux-image-6.14.0-1014-gcpUpgrade linux-image-nvidia-lowlatency-5.15Upgrade linux-image-virtualUpgrade linux-image-5.15.0-1088-realtimeUpgrade linux-image-realtime-6.14Upgrade linux-image-aws-6.14Upgrade linux-image-5.15.0-1094-azure-fipsUpgrade linux-image-5.15.0-1052-xilinx-zynqmpUpgrade linux-image-oem-20.04Upgrade linux-image-generic-hwe-20.04Upgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-gkeop-5.15Upgrade linux-image-lowlatency-64k-hwe-20.04Upgrade linux-image-nvidia-tegra-rtUpgrade linux-image-5.15.0-144-generic-64kUpgrade linux-image-5.15.0-1085-gkeUpgrade linux-image-aws-5.15Upgrade linux-image-intel-iot-realtime-5.15Upgrade linux-image-aws-64k-6.14Upgrade linux-image-5.15.0-144-fipsUpgrade linux-image-5.15.0-1030-nvidia-tegra-igx-rtUpgrade linux-image-xilinx-zynqmp-5.15Upgrade linux-image-ibm-5.15Upgrade linux-image-generic-lpae-hwe-20.04Upgrade linux-image-oem-24.04cUpgrade linux-image-gcp-lts-22.04Upgrade linux-image-5.15.0-1070-gkeopUpgrade linux-image-gcp-5.15Upgrade linux-image-kvmUpgrade linux-image-6.14.0-1011-awsUpgrade linux-image-azure-fipsUpgrade linux-image-nvidia-tegra-igx-rt-5.15Upgrade linux-image-virtual-5.15Upgrade linux-image-generic-64k-6.14Upgrade linux-image-azure-cvmUpgrade linux-image-fipsUpgrade linux-image-nvidia-lowlatencyUpgrade linux-image-6.14.0-1014-gcp-64kUpgrade linux-image-oracle-lts-22.04Upgrade linux-image-raspi-nolpaeUpgrade linux-image-nvidia-tegra-igxUpgrade linux-image-oem-6.14Upgrade linux-image-generic-5.15Upgrade linux-image-5.15.0-1041-nvidia-tegraUpgrade linux-image-nvidia-tegra-igx-rtUpgrade linux-image-5.15.0-1088-aws-fipsUpgrade linux-image-6.14.0-28-generic-64kUpgrade linux-image-oracle-6.14Upgrade linux-image-5.15.0-1094-azureUpgrade linux-image-5.15.0-1083-intel-iotgUpgrade linux-image-6.14.0-1011-aws-64kUpgrade linux-image-realtimeUpgrade linux-image-aws-64k-5.15Upgrade linux-image-5.15.0-1030-nvidia-tegra-igxUpgrade linux-image-6.14.0-1010-oemUpgrade linux-image-5.15.0-1081-intel-iot-realtimeUpgrade linux-image-awsUpgrade linux-image-aws-fipsUpgrade linux-image-azure-5.15Upgrade linux-image-nvidiaUpgrade linux-image-gcp-64k-6.14Upgrade linux-image-aws-64kUpgrade linux-image-aws-64k-lts-22.04Upgrade linux-image-6.14.0-1011-oracle-64kUpgrade linux-image-5.15.0-144-genericUpgrade linux-image-gcp-fips-5.15Upgrade linux-image-intel-iotg-5.15Upgrade linux-image-oem-20.04cUpgrade linux-image-oem-24.04aUpgrade linux-image-raspiUpgrade linux-image-lowlatency-64kUpgrade linux-image-5.15.0-1080-ibmUpgrade linux-image-kvm-5.15Upgrade linux-image-fips-5.15Upgrade linux-image-generic-lpae-5.15Upgrade linux-image-raspi-6.14Upgrade linux-image-xilinx-zynqmpUpgrade linux-image-generic-64kUpgrade linux-image-generic-lpaeUpgrade linux-image-nvidia-tegra-igx-5.15Upgrade linux-image-5.15.0-1087-gcpUpgrade linux-image-gcp-6.14Upgrade linux-image-oem-20.04dUpgrade linux-image-5.15.0-1088-aws-64kUpgrade linux-image-intelUpgrade linux-image-raspi-5.15Upgrade linux-image-5.15.0-144-lowlatency-64kUpgrade linux-image-intel-iotgUpgrade linux-image-oracle-5.15Upgrade linux-image-5.15.0-1041-nvidia-tegra-rtUpgrade linux-image-5.15.0-1082-nvidiaUpgrade linux-image-5.15.0-144-lowlatencyUpgrade linux-image-azureUpgrade linux-image-ibmUpgrade linux-image-lowlatencyUpgrade linux-image-5.15.0-1083-raspiUpgrade linux-image-oracle-64k-6.14Upgrade linux-image-lowlatency-hwe-20.04Upgrade linux-image-nvidia-tegraUpgrade linux-image-generic-6.14Upgrade linux-image-genericUpgrade linux-image-5.15.0-144-generic-lpaeUpgrade linux-image-6.14.0-28-genericUpgrade linux-image-5.15.0-1087-gcp-fipsUpgrade linux-image-gkeopUpgrade linux-image-generic-hwe-24.04Upgrade linux-image-azure-6.14Upgrade linux-image-aws-lts-22.04Upgrade linux-image-virtual-hwe-24.04Upgrade linux-image-oracle-64kUpgrade linux-image-nvidia-tegra-rt-5.15Upgrade linux-image-lowlatency-5.15Upgrade linux-image-azure-lts-22.04Upgrade linux-image-6.14.0-1011-oracleUpgrade linux-image-5.15.0-1088-awsUpgrade linux-image-gkeUpgrade linux-image-gcpUpgrade linux-image-5.15.0-1085-oracleUpgrade linux-image-5.15.0-1084-kvmUpgrade linux-image-virtual-hwe-20.04Upgrade linux-image-virtual-6.14Upgrade linux-image-realtime-5.15Upgrade linux-image-oem-24.04Upgrade linux-image-oem-20.04bUpgrade linux-image-nvidia-tegra-5.15Upgrade linux-image-nvidia-5.15Upgrade linux-image-gcp-fipsUpgrade linux-image-azure-fips-5.15Upgrade linux-image-gcp-64kUpgrade linux-image-aws-fips-5.15Upgrade linux-image-6.14.0-1012-raspiUpgrade linux-image-6.14.0-1010-realtimeUpgrade linux-image-intel-iot-realtimeUpgrade linux-image-gke-5.15Upgrade linux-image-generic-64k-hwe-20.04Upgrade linux-image-generic-64k-5.15 | Jun 26, 2025 | May 20, 2025 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jul 2, 2025 | May 20, 2025 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub