CVE-2026-139749: ACPI: APEI: GHES: Validate memory error section length before payload access
In the Linux kernel, the following vulnerability has been resolved:
ACPI: APEI: GHES: Validate memory error section length before payload access
ghesdoproc() hands the CPERSECPLATFORMMEM payload to the report chain, archapeireportmemerror() and gheshandlememoryfailure() without checking gdata->errordatalength. All three read validationbits and physicaladdr, at offsets 0 and 16, so a shorter section reads past the record.
Check the length once in ghesdoproc(), before any consumer runs. Take the 73-byte struct cpersecmemerrold as the floor: older firmware legitimately emits that UEFI 2.1/2.2 layout, and it makes validationbits safe to read.
The fields from "extended" on are absent from that layout, so also require whatever length the validation bits claim. Derive it per field rather than demanding the full 80 bytes: rank needs only 76, and the BANKGROUP and BANKADDRESS bits describe "bank" at offset 38, which every record carries. Testing the whole mask against one size, as cperprintmem() does, gets it wrong both ways.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In ghes_do_proc(), validate the CPER_SEC_PLATFORM_MEM payload length before passing it to any consumer. Use 73 bytes as the minimum for the older cper_sec_mem_err_old layout, and check each field against its own required length rather than requiring 80 bytes for the entire validation mask; rank requires 76 bytes, and extended fields require enough bytes to include them.