CVE-2025-21954 netmem: prevent TX of unreadable skbs
A Linux kernel flaw allows denial of service when redirecting unreadable network memory packets to the transmit path, requiring specific traffic control configurations.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-21954?
CVE-2025-21954 is a critical denial of service vulnerability in Linux kernel, published on 1 Apr 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
netmem: prevent TX of unreadable skbs
Currently on stable trees we have support for netmem/devmem RX but not TX. It is not safe to forward/redirect an RX unreadable netmem packet into the device's TX path, as the device may call dma-mapping APIs on dma addrs that should not be passed to it.
Fix this by preventing the xmit of unreadable skbs.
Tested by configuring tc redirect:
sudo tc qdisc add dev eth1 ingress sudo tc filter add dev eth1 ingress protocol ip prio 1 flower ip_proto \ tcp src_ip 192.168.1.12 action mirred egress redirect dev eth1
Before, I see unreadable skbs in the driver's TX path passed to dma mapping APIs.
After, I don't see unreadable skbs in the driver's TX path passed to dma mapping APIs.
Weakness: CWE-401
Which versions are affected by CVE-2025-21954?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-21954?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-21954 being exploited?
There is no known exploitation of CVE-2025-21954 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-21954, DEBIAN-CVE-2025-21954, GHSA-5mxp-4f79-c8g9, UBUNTU-CVE-2025-21954.