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

Medium 5.5 Published Updated

A NULL pointer dereference in the Linux kernel PCI subsystem can cause a system crash during SR-IOV virtual function creation errors.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-22092?

CVE-2025-22092 is a medium-severity vulnerability in Linux kernel, published on 16 Apr 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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]

Weakness: CWE-476

Which versions are affected by CVE-2025-22092?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-22092?

Apply the vendor's patch.

Is CVE-2025-22092 being exploited?

There is no known exploitation of CVE-2025-22092 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-22092, GHSA-83jq-f5p9-r6x4, ROOT-OS-DEBIAN-13-CVE-2025-22092, UBUNTU-CVE-2025-22092.

Is CVE-2025-22092 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free