CVE-2025-21808 net: xdp: Disallow attaching device-bound programs in generic mode

High 7.8 Published Updated

Attaching device-bound XDP programs in generic mode causes kernel crashes due to invalid context access, leading to denial of service.

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

CVE-2025-21808 is a high-severity vulnerability in Linux kernel, published on 27 Feb 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:

net: xdp: Disallow attaching device-bound programs in generic mode

Device-bound programs are used to support RX metadata kfuncs. These kfuncs are driver-specific and rely on the driver context to read the metadata. This means they can't work in generic XDP mode. However, there is no check to disallow such programs from being attached in generic mode, in which case the metadata kfuncs will be called in an invalid context, leading to crashes.

Fix this by adding a check to disallow attaching device-bound programs in generic mode.

Which versions are affected by CVE-2025-21808?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21808?

Apply the vendor's patch.

Is CVE-2025-21808 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21808, DEBIAN-CVE-2025-21808, GHSA-gh8v-hvqf-g2jx, ROOT-OS-UBUNTU-2404-CVE-2025-21808, UBUNTU-CVE-2025-21808.

Is CVE-2025-21808 in your software?

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

Check your SBOMs for free