CVE-2026-143458: efi/cper: Read only validated fields in cper_mem_err_pack()
In the Linux kernel, the following vulnerability has been resolved:
efi/cper: Read only validated fields in cpermemerrpack()
cpermemerrpack() copies extended, rank, memarrayhandle and memdevhandle unconditionally. Those live at offsets 73 to 79, past the end of struct cpersecmemerrold, the 73-byte UEFI 2.1/2.2 layout that older firmware still emits and that cperestatusprintsection() admits. On such a record the copy reads up to seven bytes past the payload, and off the end of the error status block when that section is the last one.
Copy each of the four only when its validation bit is set, and zero it otherwise. Nothing is lost: a 2.1/2.2 record leaves those bits clear, and every consumer of struct cpermemerrcompact already gates the fields on the same bits. Zeroing also stops callers reading them back out of the uninitialised on-stack struct they pass in.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In cper_mem_err_pack(), copy extended, rank, mem_array_handle, and mem_dev_handle only when each field’s validation bit is set, and zero each field when its validation bit is clear.
Event History
Frequently Asked Questions
Which systems are exposed to this issue?
Linux kernel systems that process CPER memory error records using the older 73-byte UEFI 2.1/2.2 memory-error layout are exposed. The issue is relevant where older firmware still emits that layout.
What condition triggers the out-of-bounds read?
The read occurs when cper_mem_err_pack() unconditionally copies fields located at offsets 73 through 79 from an old-format record. If that section is the final section in the error status block, the read can extend beyond the end of that block.
Are the affected fields needed for older UEFI records?
No. UEFI 2.1/2.2 records leave the validation bits for extended, rank, mem_array_handle, and mem_dev_handle clear, and consumers already gate use of those fields on the same bits.
What does the fix change?
The fix copies each affected field only when its validation bit is set and otherwise zeros it. This prevents both reads beyond the record payload and later reads of uninitialized values from the on-stack compact structure.