CVE-2025-21791 vrf: use RCU protection in l3mdev_l3_out()
A missing RCU lock in the Linux kernel VRF module allows a use-after-free, potentially enabling local attackers to execute code or escalate privileges.
- 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-21791?
CVE-2025-21791 is a high-severity use after free 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:
vrf: use RCU protection in l3mdev_l3_out()
l3mdev_l3_out() can be called without RCU being held:
raw_sendmsg() ip_push_pending_frames() ip_send_skb() ip_local_out() __ip_local_out() l3mdev_ip_out()
Add rcu_read_lock() / rcu_read_unlock() pair to avoid a potential UAF.
Weakness: CWE-416
Which versions are affected by CVE-2025-21791?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-21791?
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-21791 being exploited?
There is no known exploitation of CVE-2025-21791 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-58476, AZL-58566, BELL-CVE-2025-21791, DEBIAN-CVE-2025-21791, GHSA-vr2w-w74g-r822, ROOT-OS-UBUNTU-2404-CVE-2025-21791 and 1 more.