Local privilege escalation via VRF teardown race
Published Feb 27, 2025 · Updated Aug 5, 2026
Use-after-free in the Linux kernel VRF path allows local users to gain kernel privileges through concurrent VRF teardown and packet sends. The l3mdev_l3_out function dereferences VRF master adjacency data without an RCU read-side critical section while another thread can free it. A local unprivileged user can obtain CAP_NET_ADMIN in a user namespace, race packet transmission against VRF unenslave or deletion, and trigger a kernel crash or control-flow hijack.
Summary
What happened
Use-after-free in the Linux kernel VRF path allows local users to gain kernel privileges through concurrent VRF teardown and packet sends. The l3mdev_l3_out function dereferences VRF master adjacency data without an RCU read-side critical section while another thread can free it. A local unprivileged user can obtain CAP_NET_ADMIN in a user namespace, race packet transmission against VRF unenslave or deletion, and trigger a kernel crash or control-flow hijack.
The record
- CVE
- CVE-2025-21791
- Published
- Feb 27, 2025
- Updated
- Aug 5, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- CWE-416, T1068
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Feb 27, 2025CVE publishedPublication date reported by the CVE source.
- Aug 5, 2026Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=4.9
- Affected versionversion=a8e3e1a9f02094145580ea7920c6a1d9aabd5539 <022cac1c693add610ae76ede03adf4d9d5a2cf21
- Affected versionversion=a8e3e1a9f02094145580ea7920c6a1d9aabd5539 <20a3489b396764cc9376e32a9172bee26a89dc3b
- Affected versionversion=a8e3e1a9f02094145580ea7920c6a1d9aabd5539 <5bb4228c32261d06e4fbece37ec3828bcc005b6b
- Affected versionversion=a8e3e1a9f02094145580ea7920c6a1d9aabd5539 <6ccaa5797f5362a2aad6baa6ddaf4715ac2dd51e
- Affected versionversion=a8e3e1a9f02094145580ea7920c6a1d9aabd5539 <6d0ce46a93135d96b7fa075a94a88fe0da8e8773
- Affected versionversion=a8e3e1a9f02094145580ea7920c6a1d9aabd5539 <7b81425b517accefd46bee854d94954f5c57e019
- Affected versionversion=a8e3e1a9f02094145580ea7920c6a1d9aabd5539 <c40cb5c03e37552d6eff963187109e2c3f78ef6f
- Affected versionversion=a8e3e1a9f02094145580ea7920c6a1d9aabd5539 <c7574740be8ce68a57d0aece24987b9be2114c3c
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo