CVE-2025-40174: x86/mm: Fix SMP ordering in switch_mm_irqs_off()
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 ]
Security readout for executives and security teams
Plain-English summary
A Linux x86 memory-management ordering flaw can leave processors using outdated address translations during task switches. This could undermine memory isolation or crash affected systems. Exploitation requires local, low-privileged access according to the supplied CVSS assessment, so internet exposure alone is not sufficient.
Executive priority
Treat this as a high-priority operating-system update for shared or multi-user x86 infrastructure. Schedule remediation promptly through normal kernel maintenance, while prioritizing systems that grant local access to less-trusted users. Emergency internet-facing containment is not indicated by the supplied evidence alone.
Technical view
switch_mm_irqs_off() may store loaded_mm and then read tlb_gen without the required SMP memory barrier. Concurrent flush_tlb_mm_range() activity can therefore be observed out of order, allowing a missed TLB invalidation. The referenced Linux stable commits correct this ordering defect.
Likely exposure
Exposure is most relevant to multiprocessor x86 Linux systems running kernels that lack the referenced fixes, especially shared systems permitting untrusted local users. The supplied version metadata is ambiguous, so kernel lineage and backported fixes should be verified through distributor advisories and package changelogs.
Exploitation context
The supplied record does not report active exploitation and indicates the CVE is not in KEV. Its CVSS vector describes a local, low-complexity attack requiring low privileges, with no user interaction. No public proof of concept or demonstrated attack is identified in the provided sources.
Researcher notes
The security consequence arises from stale TLB entries surviving when a context switch misses a recent tlb_gen update. This could affect confidentiality, integrity, and availability, consistent with CVSS 7.8. The bundle does not establish a reliable affected-version range across distributions; fix-commit ancestry or documented backports are stronger validation signals.
Mitigation direction
Apply a vendor-supported kernel containing the appropriate referenced stable fix.
Check distributor guidance for backported package versions and reboot requirements.
Prioritize shared x86 systems where untrusted users can obtain local access.
Validation and detection
Inventory x86 Linux systems and record their running kernel builds.
Check vendor package changelogs for inclusion of the referenced fix commits.
Confirm the corrected kernel is running after maintenance or reboot.
Review distributor advisories where upstream version boundaries remain unclear.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-40174 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
3Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.