CVE-2025-22092

PCI: Fix NULL dereference in SR-IOV VF creation error path

MEDIUM
5.5
CVSS Score
Published: April 16, 2025 at 02:12 PM UTC
Updated: June 17, 2026 at 08:45 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: PCI: Fix NULL dereference in SR-IOV VF creation error path Clean up when virtfn setup fails to prevent NULL pointer dereference during device removal. The kernel oops below occurred due to incorrect error handling flow when pci_setup_device() fails. Add pci_iov_scan_device(), which handles virtfn allocation and setup and cleans up if pci_setup_device() fails, so pci_iov_add_virtfn() doesn't need to call pci_stop_and_remove_bus_device(). This prevents accessing partially initialized virtfn devices during removal. BUG: kernel NULL pointer dereference, address: 00000000000000d0 RIP: 0010:device_del+0x3d/0x3d0 Call Trace: pci_remove_bus_device+0x7c/0x100 pci_iov_add_virtfn+0xfa/0x200 sriov_enable+0x208/0x420 mlx5_core_sriov_configure+0x6a/0x160 [mlx5_core] sriov_numvfs_store+0xae/0x1a0 [bhelgaas: commit log, return ERR_PTR(-ENOMEM) directly]

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.13 ≤ v < 6.13.116.13 ≤ v < 6.14.26.13 ≤ v < 6.156.14 ≤ v < 6.14.26.13e3f30d563a388220a7c4e3b9a7b52ac0b0324b26
Vendor states this is fixed in 04d50d953ab46d96b0b32d5ad955fceaa28622db (fixed)
Vendor states this is fixed in c67a233834b778b8c78f8b62c072ccf87a9eb6d0 (fixed)
Vendor states this is fixed in ef421b4d206f0d3681804b8f94f06a8458a53aaf (fixed)
Vendor states this is fixed in 6.13 (unaffected)
Vendor states this is fixed in 6.13.11 (unaffected)
Vendor states this is fixed in 6.14.2 (unaffected)
Vendor states this is fixed in 6.15 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/04d50d953ab46d96b0b32d5ad955fceaa28622db
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c67a233834b778b8c78f8b62c072ccf87a9eb6d0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ef421b4d206f0d3681804b8f94f06a8458a53aaf

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card