x86/mm: Eliminate window where TLB flushes may be inadvertently skipped
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6db2526c1d694c91c6e05e2f186c085e9460f202 · < fea4e317f9e7e1f449ce90dedc27a2d2a95bee5a| No fix yet |
| Linux Linux |
|
|
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 ===
From the CVE record · Linux
A bug in the Linux kernel's x86 memory-management code can suppress required TLB flushes during a brief window when switching address spaces. The input does not describe an attacker action or specify whether exploitation requires local access, authentication, or user interaction.
Engineers running the Linux kernel on x86 systems should check whether their kernel is affected; affected versions are not specified.