CVE-2025-22031

In the Linux kernel, the following vulnerability has been resolved: PCI/bwctrl: Fix NULL pointer dereference on bus number exhaustion When BIOS neglects to assign bus numbers to PCI bridges, the kernel attempts to correct that during PCI device enumeration. If it runs out of bus numbers, no pci_bus is allocated and the "subordinate" pointer in the bridge's pci_dev remains NULL. The PCIe bandwidth controller erroneously does not check for a NULL subordinate pointer and dereferences it on probe. Bandwidth control of unusable devices below the bridge is of questionable utility, so simply error out instead. This mirrors what PCIe hotplug does since commit 62e4492c3063 ("PCI: Prevent NULL dereference during pciehp probe"). The PCI core emits a message with KERN_INFO severity if it has run out of bus numbers. PCIe hotplug emits an additional message with KERN_ERR severity to inform the user that hotplug functionality is disabled at the bridge. A similar message for bandwidth control does not seem merited, given that its only purpose so far is to expose an up-to-date link speed in sysfs and throttle the link speed on certain laptops with limited Thermal Design Power. So error out silently. User-visible messages: pci 0000:16:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring [...] pci_bus 0000:45: busn_res: [bus 45-74] end is updated to 74 pci 0000:16:02.0: devices behind bridge are unusable because [bus 45-74] cannot be assigned for them [...] pcieport 0000:16:02.0: pciehp: Hotplug bridge without secondary bus, ignoring [...] BUG: kernel NULL pointer dereference RIP: pcie_update_link_speed pcie_bwnotif_enable pcie_bwnotif_probe pcie_port_probe_service really_probe
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

29 Apr 2025, 18:57

Type Values Removed Values Added
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
First Time Linux linux Kernel
Linux
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: PCI/bwctrl: Corrección de la desreferencia de puntero nulo al agotar el número de bus. Cuando la BIOS no asigna números de bus a los puentes PCI, el kernel intenta corregirlo durante la enumeración de dispositivos PCI. Si se agotan los números de bus, no se asigna ningún pci_bus y el puntero "subordinado" en el pci_dev del puente permanece nulo. El controlador de ancho de banda PCIe no busca erróneamente un puntero subordinado nulo y lo desreferencia al sondear. El control del ancho de banda de los dispositivos inutilizables debajo del puente es de dudosa utilidad, por lo que simplemente se genera un error. Esto refleja lo que hace PCIe hotplug desde el commit 62e4492c3063 ("PCI: Evitar la desreferencia de puntero nulo durante el sondeo pciehp"). El núcleo PCI emite un mensaje con severidad KERN_INFO si se agotan los números de bus. PCIe hotplug emite un mensaje adicional con severidad KERN_ERR para informar al usuario que la función hotplug está deshabilitada en el puente. Un mensaje similar para el control del ancho de banda no parece justificado, dado que su único propósito hasta ahora es mostrar una velocidad de enlace actualizada en sysfs y limitarla en ciertas computadoras portátiles con potencia de diseño térmico limitada. Por lo tanto, el error se emite silenciosamente. Mensajes visibles para el usuario: pci 0000:16:02.0: configuración de puente no válida ([bus 00-00]), reconfigurando [...] pci_bus 0000:45: busn_res: el extremo [bus 45-74] se actualiza a 74 pci 0000:16:02.0: los dispositivos detrás del puente no se pueden usar porque no se puede asignar [bus 45-74] para ellos [...] pcieport 0000:16:02.0: pciehp: Puente hot-plug sin bus secundario, ignorando [...] ERROR: desreferencia de puntero NULL del kernel RIP: pcie_update_link_speed pcie_bwnotif_enable pcie_bwnotif_probe pcie_port_probe_service really_probe
CWE CWE-476
References () https://git.kernel.org/stable/c/1181924af78e5299ddec6e457789c02dd5966559 - () https://git.kernel.org/stable/c/1181924af78e5299ddec6e457789c02dd5966559 - Patch
References () https://git.kernel.org/stable/c/667f053b05f00a007738cd7ed6fa1901de19dc7e - () https://git.kernel.org/stable/c/667f053b05f00a007738cd7ed6fa1901de19dc7e - Patch
References () https://git.kernel.org/stable/c/d93d309013e89631630a12b1770d27e4be78362a - () https://git.kernel.org/stable/c/d93d309013e89631630a12b1770d27e4be78362a - Patch

16 Apr 2025, 15:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-04-16 15:15

Updated : 2025-04-29 18:57


NVD link : CVE-2025-22031

Mitre link : CVE-2025-22031

CVE.ORG link : CVE-2025-22031


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-476

NULL Pointer Dereference