x86/kexec: add a sanity check on previous kernel's ima kexec buffer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b69a2afd5afce9bf6d56e349d6ab592c916e20f2 · < 4d7a8f5f28187e3d2958b2a134473da2665207e7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
x86/kexec: add a sanity check on previous kernel's ima kexec buffer
When the second-stage kernel is booted via kexec with a limiting command line such as "mem=<size>", the physical range that contains the carried over IMA measurement list may fall outside the truncated RAM leading to a kernel panic.
BUG: unable to handle page fault for address: ffff97793ff47000 RIP: ima_restore_measurement_list+0xdc/0x45a #PF: error_code(0x0000) – not-present page
Other architectures already validate the range with page_is_ram(), as done in commit cbf9c4b9617b ("of: check previous kernel's ima-kexec-buffer against memory bounds") do a similar check on x86.
Without carrying the measurement list across kexec, the attestation would fail.
From the CVE record · Linux
On x86, the Linux kernel may try to restore a carried-over IMA measurement list from memory outside the RAM available to a second-stage kernel. Booting that kernel via kexec with a limiting command line such as `mem=<size>` can cause a kernel panic. The input does not specify attacker access or authentication requirements.
Engineers running the Linux kernel on x86 with kexec and carried-over IMA measurement lists should check their affected versions; no version range was provided.