CVE-2026-98640 in Linux信息

摘要

由 VulDB • 2026-10-18

在 Linux 内核中,已修复以下漏洞:

HID: amd_sfh:映射前验证 PCI BAR 大小

amd_sfh 驱动程序使用 pcim_iomap_regions() 映射 PCI BAR 2,并随后访问偏移量高达 0x10958(例如位于 0x1068C 的 AMD_P2C_MSG3)的 MMIO 寄存器。然而,该驱动程序从未验证 BAR 大小是否足够大以覆盖这些访问操作。如果驱动程序绑定到具有较小 BAR 2 的设备上,这将导致越界内存访问以及在探测函数(probe function)期间发生页错误。

例如,在 mp2_select_ops() 中读取 privdata->mmio + AMD_P2C_MSG3 时可能会发生页错误:

BUG: unable to handle page fault for address: ffffc9000390368c PGD 100000067 P4D 100000067 PUD 1012c1067 PMD 105b64067 PTE 0 Oops: Oops: 0000 [#1] SMP KASAN NOPTI
RIP: 0010:readl arch/x86/include/asm/io.h:59 [inline]
RIP: 0010:mp2_select_ops drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:282 [inline]
RIP: 0010:amd_mp2_pci_probe+0x337/0x5f0 drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:487 Call Trace: local_pci_probe drivers/pci/pci-driver.c:332 [inline]
pci_call_probe drivers/pci/pci-driver.c:394 [inline]
__pci_device_probe drivers/pci/pci-driver.c:455 [inline]
pci_device_probe+0x431/0xc90 drivers/pci/pci-driver.c:489

通过验证 BAR 2 的长度至少为 128KB,然后再尝试映射它来修复此问题。由于最大访问偏移量为 0x10958,且 PCI BAR 大小为 2 的幂次方,任何合法硬件都将具有至少 128KB 的 BAR 大小。

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

来源

Want to know what is going to be exploited?

We predict KEV entries!