x86/mm: Eliminate window where TLB flushes may be inadvertently skipped
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
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.15.183, 6.1.139, 6.12.29, 6.14.7, 6.6.91
- CVEs
- CVE-2025-37964
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 13:44 UTC · Revision 1
Source evidence
x86/mm: Eliminate window where TLB flushes may be inadvertently skipped
core-osv · Original sourcePublished 20 May 2025, 16:01 UTC
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
osv:CVE-2025-37964
Kernel
Fixed versions: 5.15.183, 6.1.139, 6.6.91, 6.12.29, 6.14.7
Complete source record
{
"id": "ca6c005266b0591e7f9fbb133aad703b513e6fbe3f6b17ae978c49cddcb829fc",
"url": "https://osv.dev/vulnerability/CVE-2025-37964",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "x86/mm: Eliminate window where TLB flushes may be inadvertently skipped",
"summary": "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 ",
"evidence": "osv:CVE-2025-37964",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.15.183",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.139",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.91",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.29",
"evidence": "/affected/1/ranges"
},
{
"value": "6.14.7",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "CVE-2025-37964",
"aliases": [
"CVE-2025-37964"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "848b5815177582de0e1d0118725378e0fbadca20"
},
{
"fixed": "12f703811af043d32b1c8a30001b2fa04d5cd0ac"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "b47002ed65ade940839b7f439ff4a194e7d5ec28"
},
{
"fixed": "02ad4ce144bd27f71f583f667fdf3b3ba0753477"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "a04fe3bfc71e28009e20357b79df1e8ef7c9d600"
},
{
"fixed": "d41072906abec8bb8e01ed16afefbaa558908c89"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "3dbe889a1b829b4c07e0836ff853fe649e51ce4f"
},
{
"fixed": "d87392094f96e162fa5fa5a8640d70cc0952806f"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6db2526c1d694c91c6e05e2f186c085e9460f202"
},
{
"fixed": "399ec9ca8fc4999e676ff89a90184ec40031cf59"
},
{
"fixed": "fea4e317f9e7e1f449ce90dedc27a2d2a95bee5a"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "5.15.179"
},
{
"fixed": "5.15.183"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.1.129"
},
{
"fixed": "6.1.139"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.6.79"
},
{
"fixed": "6.6.91"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.12.16"
},
{
"fixed": "6.12.29"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "6.13.4"
},
{
"fixed": "6.14"
}
]
},
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "d1347977661342cb09a304a17701eb2d4aa21dec"
}
]
}
],
"versions": [
"v5.15.182",
"v5.15.181",
"v5.15.180",
"v5.15.179",
"v6.1.138",
"v6.1.137",
"v6.1.136",
"v6.1.135",
"v6.1.134",
"v6.1.133",
"v6.1.132",
"v6.1.131",
"v6.1.130",
"v6.1.129",
"v6.6.90",
"v6.6.89",
"v6.6.88",
"v6.6.87",
"v6.6.86",
"v6.6.85",
"v6.6.84",
"v6.6.83",
"v6.6.82",
"v6.6.81",
"v6.6.80",
"v6.6.79",
"v6.12.28",
"v6.12.27",
"v6.12.26",
"v6.12.25",
"v6.12.24",
"v6.12.23",
"v6.12.22",
"v6.12.21",
"v6.12.20",
"v6.12.19",
"v6.12.18",
"v6.12.17",
"v6.12.16",
"v6.13.12",
"v6.13.11",
"v6.13.10",
"v6.13.9",
"v6.13.8",
"v6.13.7",
"v6.13.6",
"v6.13.5",
"v6.13.4"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37964.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.15.183"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.139"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.91"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.29"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.14.7"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-37964.json"
}
}
],
"modified": "2026-10-28T02:30:29.593727178Z",
"provider": "osv",
"references": [
"https://cert-portal.siemens.com/productcert/html/ssa-019113.html",
"https://cert-portal.siemens.com/productcert/html/ssa-457936.html",
"https://git.kernel.org/stable/c/02ad4ce144bd27f71f583f667fdf3b3ba0753477",
"https://git.kernel.org/stable/c/12f703811af043d32b1c8a30001b2fa04d5cd0ac",
"https://git.kernel.org/stable/c/399ec9ca8fc4999e676ff89a90184ec40031cf59",
"https://git.kernel.org/stable/c/d41072906abec8bb8e01ed16afefbaa558908c89",
"https://git.kernel.org/stable/c/d87392094f96e162fa5fa5a8640d70cc0952806f",
"https://git.kernel.org/stable/c/fea4e317f9e7e1f449ce90dedc27a2d2a95bee5a",
"https://lists.debian.org/debian-lts-announce/2025/08/msg00010.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37964.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-37964",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/37xxx/CVE-2025-37964.json"
}
},
"related_cves": [
{
"value": "CVE-2025-37964",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 496054,
"published_at": "2025-05-20T16:01:56.013+00:00"
}