CVE-2025-21934 rapidio: fix an API misues when rio_add_net() fails
A use-after-free vulnerability in the Linux kernel RapidIO subsystem allows attackers to cause denial of service or execute arbitrary code.
- 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-21934?
CVE-2025-21934 is a high-severity use after free 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:
rapidio: fix an API misues when rio_add_net() fails
rio_add_net() calls device_register() and fails when device_register() fails. Thus, put_device() should be used rather than kfree(). Add "mport->net = NULL;" to avoid a use after free issue.
Weakness: CWE-416
Which versions are affected by CVE-2025-21934?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-21934?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2025-21934 being exploited?
There is no known exploitation of CVE-2025-21934 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-59797, AZL-59829, BELL-CVE-2025-21934, DEBIAN-CVE-2025-21934, GHSA-p2xq-87xh-464r, ROOT-OS-UBUNTU-2404-CVE-2025-21934 and 1 more.