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 bpftool-debuginfoUpgrade kernel-toolsUpgrade kernel-livepatch-5.15.184-125.190Upgrade python-perfUpgrade kernel-livepatch-5.15.184-125.189Upgrade kernel-debuginfoUpgrade bpftoolUpgrade kernel-headersUpgrade kernelUpgrade kernel-develUpgrade perf-debuginfoUpgrade kernel-tools-debuginfoUpgrade kernel-tools-develUpgrade kernel-debuginfo-common-aarch64Upgrade perf | May 20, 2026 | May 20, 2026 |
| Amazon_linux_2023 | — | Upgrade kernelUpgrade kernel6.12-debuginfo-common-x86_64Upgrade perf6.12Upgrade kernel6.12-debuginfo-common-aarch64Upgrade kernel6.12-modules-extraUpgrade kernel6.12Upgrade perf-debuginfoUpgrade kernel-headersUpgrade kernel-libbpf-develUpgrade kernel-livepatch-6.12.29-33.102Upgrade kernel-debuginfoUpgrade kernel-debuginfo-common-x86_64Upgrade kernel-modules-extraUpgrade kernel-libbpfUpgrade kernel6.12-debuginfoUpgrade bpftoolUpgrade perfUpgrade kernel-tools-develUpgrade kernel-libbpf-debuginfoUpgrade bpftool-debuginfoUpgrade perf6.12-debuginfoUpgrade python3-perf6.12Upgrade kernel-toolsUpgrade kernel-tools-debuginfoUpgrade kernel-develUpgrade kernel-debuginfo-common-aarch64Upgrade python3-perfUpgrade python3-perf6.12-debuginfoUpgrade kernel-modules-extra-commonUpgrade kernel-libbpf-staticUpgrade kernel-livepatch-6.1.140-154.222Upgrade python3-perf-debuginfo | Jul 11, 2025 | May 20, 2025 |
| Debian | — | Upgrade linux-6.1Upgrade linux | May 28, 2025 | May 20, 2025 |
| Redhat_linux | — | No solution exists | Jul 9, 2025 | May 20, 2025 |
| Ubuntu | — | Upgrade linux-image-generic-6.14Upgrade linux-image-lowlatency-hwe-20.04Upgrade linux-image-6.14.0-28-genericUpgrade linux-image-nvidia-tegraUpgrade linux-image-lowlatency-64kUpgrade linux-image-oem-20.04dUpgrade linux-image-raspiUpgrade linux-image-oracle-64k-6.14Upgrade linux-image-fips-5.15Upgrade linux-image-gcp-6.14Upgrade linux-image-generic-lpaeUpgrade linux-image-5.15.0-1087-gcp-fipsUpgrade linux-image-5.15.0-144-generic-lpaeUpgrade linux-image-5.15.0-1083-raspiUpgrade linux-image-oracle-64kUpgrade linux-image-generic-hwe-24.04Upgrade linux-image-gkeopUpgrade linux-image-gkeUpgrade linux-image-5.15.0-1080-ibmUpgrade linux-image-nvidia-tegra-igx-5.15Upgrade linux-image-raspi-6.14Upgrade linux-image-ibmUpgrade linux-image-5.15.0-1085-oracleUpgrade linux-image-6.14.0-1011-oracle-64kUpgrade linux-image-nvidia-tegra-rt-5.15Upgrade linux-image-gcp-64k-6.14Upgrade linux-image-5.15.0-1082-nvidiaUpgrade linux-image-gcpUpgrade linux-image-xilinx-zynqmpUpgrade linux-image-6.14.0-1011-oracleUpgrade linux-image-azure-lts-22.04Upgrade linux-image-5.15.0-1088-awsUpgrade linux-image-virtual-6.14Upgrade linux-image-5.15.0-1084-kvmUpgrade linux-image-virtual-hwe-20.04Upgrade linux-image-gcp-64kUpgrade linux-image-azure-5.15Upgrade linux-image-genericUpgrade linux-image-gke-5.15Upgrade linux-image-6.14.0-1012-raspiUpgrade linux-image-lowlatency-5.15Upgrade linux-image-kvm-5.15Upgrade linux-image-intel-iot-realtimeUpgrade linux-image-6.14.0-1010-realtimeUpgrade linux-image-oem-20.04bUpgrade linux-image-nvidia-5.15Upgrade linux-image-aws-fips-5.15Upgrade linux-image-gcp-fipsUpgrade linux-image-azure-fips-5.15Upgrade linux-image-realtime-5.15Upgrade linux-image-generic-64k-5.15Upgrade linux-image-aws-lts-22.04Upgrade linux-image-virtual-hwe-24.04Upgrade linux-image-5.15.0-1087-gcpUpgrade linux-image-oem-24.04Upgrade linux-image-oem-24.04aUpgrade linux-image-intel-iotg-5.15Upgrade linux-image-oracle-5.15Upgrade linux-image-azure-6.14Upgrade linux-image-intelUpgrade linux-image-generic-lpae-5.15Upgrade linux-image-5.15.0-144-genericUpgrade linux-image-nvidia-tegra-5.15Upgrade linux-image-generic-64k-hwe-20.04Upgrade linux-image-aws-64k-lts-22.04Upgrade linux-image-azureUpgrade linux-image-aws-64kUpgrade linux-image-intel-iotgUpgrade linux-image-5.15.0-1041-nvidia-tegra-rtUpgrade linux-image-5.15.0-144-lowlatencyUpgrade linux-image-5.15.0-144-lowlatency-64kUpgrade linux-image-lowlatencyUpgrade linux-image-nvidiaUpgrade linux-image-5.15.0-1088-aws-64kUpgrade linux-image-gcp-fips-5.15Upgrade linux-image-raspi-5.15Upgrade linux-image-generic-64kUpgrade linux-image-oem-20.04cUpgrade linux-image-5.15.0-1030-nvidia-tegra-igx-rtUpgrade linux-image-nvidia-tegra-igx-rt-5.15Upgrade linux-image-oem-24.04cUpgrade linux-image-realtime-6.14Upgrade linux-image-virtualUpgrade linux-image-generic-64k-6.14Upgrade linux-image-aws-fipsUpgrade linux-image-aws-64k-5.15Upgrade linux-image-realtimeUpgrade linux-image-6.14.0-1011-awsUpgrade linux-image-6.14.0-1014-gcpUpgrade linux-image-5.15.0-1081-intel-iot-realtimeUpgrade linux-image-5.15.0-144-fipsUpgrade linux-image-aws-5.15Upgrade linux-image-generic-lpae-hwe-20.04Upgrade linux-image-ibm-5.15Upgrade linux-image-lowlatency-64k-hwe-20.04Upgrade linux-image-kvmUpgrade linux-image-gkeop-5.15Upgrade linux-image-generic-64k-hwe-24.04Upgrade linux-image-gcp-lts-22.04Upgrade linux-image-gcp-5.15Upgrade linux-image-5.15.0-1094-azure-fipsUpgrade linux-image-5.15.0-1088-realtimeUpgrade linux-image-generic-hwe-20.04Upgrade linux-image-aws-6.14Upgrade linux-image-nvidia-lowlatencyUpgrade linux-image-nvidia-tegra-rtUpgrade linux-image-raspi-nolpaeUpgrade linux-image-oracle-lts-22.04Upgrade linux-image-oem-6.14Upgrade linux-image-nvidia-tegra-igxUpgrade linux-image-intel-iot-realtime-5.15Upgrade linux-image-generic-5.15Upgrade linux-image-awsUpgrade linux-image-6.14.0-1010-oemUpgrade linux-image-5.15.0-1085-gkeUpgrade linux-image-5.15.0-1030-nvidia-tegra-igxUpgrade linux-image-xilinx-zynqmp-5.15Upgrade linux-image-5.15.0-1041-nvidia-tegraUpgrade linux-image-virtual-5.15Upgrade linux-image-fipsUpgrade linux-image-azure-cvmUpgrade linux-image-6.14.0-28-generic-64kUpgrade linux-image-5.15.0-1094-azureUpgrade linux-image-5.15.0-1083-intel-iotgUpgrade linux-image-oracle-6.14Upgrade linux-image-5.15.0-1088-aws-fipsUpgrade linux-image-lowlatency-64k-5.15Upgrade linux-image-6.14.0-1011-aws-64kUpgrade linux-image-nvidia-lowlatency-5.15Upgrade linux-image-azure-fipsUpgrade linux-image-aws-64k-6.14Upgrade linux-image-6.14.0-1010-azureUpgrade linux-image-5.15.0-144-generic-64kUpgrade linux-image-5.15.0-1082-nvidia-lowlatencyUpgrade linux-image-oracleUpgrade linux-image-nvidia-tegra-igx-rtUpgrade linux-image-6.14.0-1014-gcp-64kUpgrade linux-image-5.15.0-1052-xilinx-zynqmpUpgrade linux-image-5.15.0-1070-gkeopUpgrade linux-image-oem-20.04 | 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