Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 5.15.179 – < 5.15.183, 6.1.129 – < 6.1.139, 6.6.79 – < 6.6.91, 6.12.16 – < 6.12.29, 6.13.4 – < 6.14, 6.14 | 5.15.183 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.12.29-1 | — |
| Debian 13 | linux | 6.12.29-1 | — |
| Debian 12 | linux | 6.1.140-1 | DSA-5925-1 |
| Debian 11 | linux-6.1 | 6.1.140-1~deb11u1 | DLA-4271-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Nvidia-BlueField 22.04 LTS | linux-bluefield | 5.15.0-1072.74 | — |
| Ubuntu 25.10 | linux-azure-fde | No fix yet | — |
| Ubuntu 25.04 | linux-azure | 6.14.0-1010.10 | USN-7721-1 |
| Ubuntu 24.04 LTS | linux-aws-6.14 +1 | 6.14.0-1011.11~24.04.1 | USN-7699-1 |
| Ubuntu 24.04 LTS | linux-gcp-6.11 +7 | No fix yet | — |
| Ubuntu 24.04 LTS | linux-gcp-6.14 | 6.14.0-1014.15~24.04.1 | USN-7699-1 |
| Ubuntu 24.04 LTS | linux-hwe-6.14 | 6.14.0-28.28~24.04.1 | USN-7699-2 |
| Ubuntu 24.04 LTS | linux-oem-6.14 | 6.14.0-1010.10 | USN-7699-2 |
| Ubuntu 24.04 LTS | linux-riscv-6.14 | 6.14.0-28.28.1~24.04.1 | — |
| Ubuntu 22.04 LTS | linux +1 | 5.15.0-144.157 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-aws | 5.15.0-1088.95 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-azure | 5.15.0-1094.103 | USN-7711-1 |
| Ubuntu 22.04 LTS | linux-azure-fde | 5.15.0-1094.103.1 | — |
| Ubuntu 22.04 LTS | linux-gcp | 5.15.0-1087.96 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-gke +1 | 5.15.0-1085.91 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-gkeop | 5.15.0-1070.78 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-ibm | 5.15.0-1080.83 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-intel-iotg | 5.15.0-1083.89 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-kvm | 5.15.0-1084.89 | USN-7654-4 |
| Ubuntu 22.04 LTS | linux-nvidia | 5.15.0-1082.83 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-nvidia-tegra | 5.15.0-1041.41 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-nvidia-tegra-igx | 5.15.0-1030.30 | USN-7654-1 |
| Ubuntu 22.04 LTS | linux-raspi | 5.15.0-1083.86 | USN-7686-1 |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-xilinx-zynqmp | 5.15.0-1052.56 | USN-7654-5 |
Show 7 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime-6.14 | 6.14.0-1010.10~24.04.1 | — |
| Ubuntu Pro Realtime 22.04 LTS | linux-intel-iot-realtime | 5.15.0-1081.83 | USN-7654-2 |
| Ubuntu Pro Realtime 22.04 LTS | linux-realtime | 5.15.0-1088.97 | USN-7654-2 |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-aws-fips | 5.15.0-1088.95+fips1 | USN-7654-3 |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-azure-fips | 5.15.0-1094.103+fips1 | USN-7712-1 |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-fips | 5.15.0-144.157+fips1 | USN-7654-3 |
| Ubuntu Pro FIPS-updates 22.04 LTS | linux-gcp-fips | 5.15.0-1087.96+fips1 | USN-7654-3 |
| Ubuntu Pro 20.04 LTS | linux-aws-5.15 | 5.15.0-1088.95~20.04.1 | USN-7654-1 |
| Ubuntu Pro 20.04 LTS | linux-azure-5.15 | 5.15.0-1094.103~20.04.1 | USN-7712-2 |
| Ubuntu Pro 20.04 LTS | linux-gcp-5.15 | 5.15.0-1087.96~20.04.2 | USN-7654-1 |
| Ubuntu Pro 20.04 LTS | linux-hwe-5.15 +1 | 5.15.0-144.157~20.04.1 | USN-7654-1 |
| Ubuntu Pro 20.04 LTS | linux-ibm-5.15 | 5.15.0-1080.83~20.04.1 | USN-7654-1 |
| Ubuntu Pro 20.04 LTS | linux-intel-iotg-5.15 | 5.15.0-1083.89~20.04.1 | USN-7655-1 |
| Ubuntu Pro 20.04 LTS | linux-nvidia-tegra-5.15 | 5.15.0-1041.41~20.04.1 | USN-7654-1 |
| Ubuntu Pro 20.04 LTS | linux-oracle-5.15 | 5.15.0-1085.91~20.04.3 | USN-7654-1 |
| Ubuntu Pro 20.04 LTS | linux-riscv-5.15 | 5.15.0-1083.87~20.04.1 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | kernel-livepatch-6.12.29-33.102 +1 | 1.0-0.amzn2023 | ALAS2023-2025-1050, ALAS2023-2025-994 |
| Amazon Linux 2023 | perf +14 | 6.1.140-154.222.amzn2023 | ALAS2023-2025-1050, ALAS2023-2025-994 |
| Amazon Linux 2023 | perf6.12 +5 | 6.12.29-33.102.amzn2023 | ALAS2023-2025-994 |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Oracle Linux 9 | kernel-uek +34 | 6.12.0-101.33.4.3.el10uek | ELSA-2025-20530, ELSA-2025-20480 |
Advisories 24
- WID-SEC-2025-1114 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- SSA-457936 SSA-457936: Vulnerabilities in the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP V3.1.7 Siemens ProductCERT · Nov 10, 2026
- USN-7655-1 linux-intel-iotg-5.15 vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7654-1 linux, linux-aws, linux-aws-5.15, linux-gcp, linux-gcp-5.15, linux-gke, linux-gkeop, linux-hwe-5.15, linux-ibm, linux-ibm-5.15, linux-intel-iotg, linux-lowlatency, linux-lowlatency-hwe-5.15, linux-nvidia, linux-nvidia-tegra, linux-nvidia-tegra-5.15, linux-nvidia-tegra-igx, linux-oracle, linux-oracle-5.15 vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7712-2 linux-azure-5.15 vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7712-1 linux-azure-fips vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7711-1 linux-azure vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7699-2 linux-hwe-6.14, linux-oem-6.14 vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7699-1 linux, linux-aws, linux-aws-6.14, linux-gcp, linux-gcp-6.14, linux-oracle, linux-oracle-6.14, linux-raspi, linux-realtime vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7686-1 linux-raspi vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7654-3 linux-aws-fips, linux-fips, linux-gcp-fips vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7654-2 linux-intel-iot-realtime, linux-realtime vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7654-4 linux-kvm vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- USN-7654-5 linux-xilinx-zynqmp vulnerabilities Ubuntu Security Notices (USN) · Nov 3, 2026
- ICSA-26-295-11 Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP CISA ICS & IT advisories · Oct 22, 2026
- SSA-019113 SSA-019113: Vulnerabilities in the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP V3.1.6 Siemens ProductCERT · Oct 13, 2026
- ICSA-26-209-04 Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP CISA ICS & IT advisories · Jul 28, 2026
- DLA-4271-1 linux-6.1 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-5925-1 linux - security update Debian Security (DSA / DLA) · Mar 9, 2026
- USN-7721-1 linux-azure vulnerabilities Ubuntu Security Notices (USN) · Feb 4, 2026
- ALAS2023-2025-994 Important: kernel6.12 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 26, 2025
- ALAS2023-2025-1050 Important: kernel security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 26, 2025
- ELSA-2025-20530 Important: Unbreakable Enterprise kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Aug 18, 2025
- ELSA-2025-20480 Important: Unbreakable Enterprise kernel security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Jul 17, 2025
References
- https://git.kernel.org/stable/c/12f703811af043d32b1c8a30001b2fa04d5cd0ac
- https://git.kernel.org/stable/c/02ad4ce144bd27f71f583f667fdf3b3ba0753477
- https://git.kernel.org/stable/c/d41072906abec8bb8e01ed16afefbaa558908c89
- https://git.kernel.org/stable/c/d87392094f96e162fa5fa5a8640d70cc0952806f
- https://git.kernel.org/stable/c/399ec9ca8fc4999e676ff89a90184ec40031cf59
- https://git.kernel.org/stable/c/fea4e317f9e7e1f449ce90dedc27a2d2a95bee5a