CVE-2025-21904 caif_virtio: fix wrong pointer check in cfv_probe()

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel's caif_virtio driver can cause a system crash during device probing.

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-21904?

CVE-2025-21904 is a medium-severity vulnerability in Linux kernel, published on 1 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:

caif_virtio: fix wrong pointer check in cfv_probe()

del_vqs() frees virtqueues, therefore cfv->vq_tx pointer should be checked for NULL before calling it, not cfv->vdev. Also the current implementation is redundant because the pointer cfv->vdev is dereferenced before it is checked for NULL.

Fix this by checking cfv->vq_tx for NULL instead of cfv->vdev before calling del_vqs().

Weakness: CWE-476

Which versions are affected by CVE-2025-21904?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21904?

Apply the vendor's patch.

Is CVE-2025-21904 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-60346, AZL-60363, BELL-CVE-2025-21904, DEBIAN-CVE-2025-21904, GHSA-x97h-4pwx-3c9h, ROOT-OS-UBUNTU-2404-CVE-2025-21904 and 1 more.

Is CVE-2025-21904 in your software?

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

Check your SBOMs for free