x86/mtrr: Check if fixed MTRRs exist before saving them
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2b1f6278d77c1f2f669346fc2bb48012b5e9495a · < 8a90d3fc7c24608548d3a750671f9dac21d1a462| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
x86/mtrr: Check if fixed MTRRs exist before saving them
MTRRs have an obsolete fixed variant for fine grained caching control of the 640K-1MB region that uses separate MSRs. This fixed variant has a separate capability bit in the MTRR capability MSR.
So far all x86 CPUs which support MTRR have this separate bit set, so it went unnoticed that mtrr_save_state() does not check the capability bit before accessing the fixed MTRR MSRs.
Though on a CPU that does not support the fixed MTRR capability this results in a #GP. The #GP itself is harmless because the RDMSR fault is handled gracefully, but results in a WARN_ON().
Add the missing capability check to prevent this.
From the CVE record · Linux
The Linux kernel’s mtrr_save_state() accesses fixed MTRR registers without checking whether the CPU supports them. On a CPU without that capability, the access causes a fault that is handled gracefully but triggers a WARN_ON(). The input does not describe an attacker-controlled trigger, authentication requirement, or user interaction.
Engineers running the Linux kernel on x86 CPUs without fixed MTRR support should check their kernel versions against the vendor advisory; affected versions are not specified.