EFI/CPER: don't go past the ARM processor CPER record buffer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2f74f09bce4f8d0236f20174a6daae63e10fe733 · < 25b290624b0e3d2f0f90238709ee0b6009b9fde8| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
EFI/CPER: don't go past the ARM processor CPER record buffer
There's a logic inside GHES/CPER to detect if the section_length is too small, but it doesn't detect if it is too big.
Currently, if the firmware receives an ARM processor CPER record stating that a section length is big, kernel will blindly trust section_length, producing a very long dump. For instance, a 67 bytes record with ERR_INFO_NUM set 46198 and section length set to 854918320 would dump a lot of data going a way past the firmware memory-mapped area.
Fix it by adding a logic to prevent it to go past the buffer if ERR_INFO_NUM is too big, making it report instead:
[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1 [Hardware Error]: event severity: recoverable [Hardware Error]: Error 0, type: recoverable [Hardware Error]: section_type: ARM processor error [Hardware Error]: MIDR: 0xff304b2f8476870a [Hardware Error]: section length: 854918320, CPER size: 67 [Hardware Error]: section length is too big [Hardware Error]: firmware-generated error record is incorrect [Hardware Error]: ERR_INFO_NUM is 46198
[ rjw: Subject and changelog tweaks ]
From the CVE record · Linux
The Linux kernel’s EFI/CPER handling can trust an oversized section length in a firmware-generated ARM processor error record and dump data past the record buffer. The input does not describe an attacker-controlled path, authentication requirements, or user interaction.
Engineers running Linux kernels that process ARM processor CPER records should check their exposure; affected versions are not specified.