CVE-2026-72487: PCI: Check ROM header and data structure addr before accessing
In the Linux kernel, the following vulnerability has been resolved:
PCI: Check ROM header and data structure addr before accessing
We meet a crash when running stress-ng on x8664 machine:
BUG: unable to handle page fault for address: ffa0000007f40000 RIP: 0010:pcigetromsize+0x52/0x220 Call Trace: <TASK> pcimaprom+0x80/0x130 pcireadrom+0x4b/0xe0 kernfsfilereaditer+0x96/0x180 vfsread+0x1b1/0x300
Our analysis reveals that the ROM space's start address is 0xffa0000007f30000, and size is 0x10000. Because of broken ROM space, before calling readl(pds), the pds's value is 0xffa0000007f3ffff, which is already pointed to the ROM space end, invoking readl() would read 4 bytes therefore cause an out-of-bounds access and trigger a crash. Fix this by adding image header and data structure checking.
We also found another crash on arm64 machine:
Unable to handle kernel paging request at virtual address ffff8000dd1393ff Mem abort info: ESR = 0x0000000096000021 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x21: alignment fault
The call trace is the same with x8664, but the crash reason is that the data structure addr is not aligned with 4, and arm64 machine report "alignment fault". Fix this by adding alignment checking.
[bhelgaas: shorten function names, wrap comments]
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Apply the kernel fix that checks PCI ROM header and ROM-related data structure addresses for validity/alignment and prevents reads beyond the ROM end before invoking accessors like readl() (as described: check ROM header and data structure addr before accessing; add image header and data-structure checking; avoid readl() past the ROM space end).
Linux kernel PCI ROM code (pci_get_rom_size/pci_map_rom/pci_read_rom) Enable/implement ROM header and data-structure alignment + bounds checking before accessing ROM space = true