CVE-2025-40174 x86/mm: Fix SMP ordering in switch_mm_irqs_off()
A race condition in the Linux kernel x86 memory management allows attackers to bypass TLB flushes, potentially leading to information disclosure or privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-40174?
CVE-2025-40174 is a high-severity vulnerability in Linux, published on 12 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
x86/mm: Fix SMP ordering in switch_mm_irqs_off()
Stephen noted that it is possible to not have an smp_mb() between the loaded_mm store and the tlb_gen load in switch_mm(), meaning the ordering against flush_tlb_mm_range() goes out the window, and it becomes possible for switch_mm() to not observe a recent tlb_gen update and fail to flush the TLBs.
[ dhansen: merge conflict fixed by Ingo ]
Which versions are affected by CVE-2025-40174?
How do I fix CVE-2025-40174?
Apply the vendor's patch.
Is CVE-2025-40174 being exploited?
There is no known exploitation of CVE-2025-40174 in the wild and no public exploit code.
Sources
Also known as BELL-CVE-2025-40174, DEBIAN-CVE-2025-40174, GHSA-m7p7-jwxv-mmf9, UBUNTU-CVE-2025-40174.