CVE-2025-22031: PCI/bwctrl: Fix NULL pointer dereference on bus number exhaustion

Published Apr 16, 2025
·
Updated

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 pcibus is allocated and the "subordinate" pointer in the bridge's pcidev 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 KERNINFO severity if it has run out of bus numbers. PCIe hotplug emits an additional message with KERNERR 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 [...] pcibus 0000:45: busnres: [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: pcieupdatelinkspeed pciebwnotifenable pciebwnotifprobe pcieportprobeservice reallyprobe

Affected Software

3 affected components
Linux Linux kernel
Linux Linux kernel>=6.13<6.13.11
Linux Linux kernel>=6.14<6.14.2

Event History

Apr 16, 2025
CVE Published
via MITRE·02:11 PM
Data Sourced
via MITRE·02:11 PM
Description
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2025-22031?

CVE-2025-22031 has been classified as having a moderate severity level due to the risk of a NULL pointer dereference during PCI device enumeration.

2

How do I fix CVE-2025-22031?

To fix CVE-2025-22031, ensure that your Linux kernel is updated to a version beyond 6.14.2 or 6.13.11.

3

Which versions of the Linux kernel are affected by CVE-2025-22031?

CVE-2025-22031 affects Linux kernel versions between 6.13 and 6.14.2 inclusive.

4

What type of vulnerability is CVE-2025-22031?

CVE-2025-22031 is a NULL pointer dereference vulnerability that occurs during PCI device enumeration.

5

What are the potential consequences of CVE-2025-22031?

Exploitation of CVE-2025-22031 could lead to a system crash or denial of service due to incorrect handling of PCI bus numbers.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203