Kernel code execution via dangling BPF link
Published Jun 18, 2025 · Updated Aug 5, 2026
Use-after-free in the Linux kernel BPF cgroup subsystem allows local users with BPF capabilities to execute code in kernel context. On an allocation failure, update_effective_progs restores a bpf_cgroup_link pointer to the cgroup list even though bpf_link_free then releases that object, so prog_list_length later dereferences freed memory. Reaching the path requires local process execution and cgroup BPF link privileges; successful exploitation grants kernel reads, writes, or control-flow execution, while an unsuccessful trigger can crash the host.
Summary
What happened
Use-after-free in the Linux kernel BPF cgroup subsystem allows local users with BPF capabilities to execute code in kernel context. On an allocation failure, update_effective_progs restores a bpf_cgroup_link pointer to the cgroup list even though bpf_link_free then releases that object, so prog_list_length later dereferences freed memory. Reaching the path requires local process execution and cgroup BPF link privileges; successful exploitation grants kernel reads, writes, or control-flow execution, while an unsuccessful trigger can crash the host.
The record
- CVE
- CVE-2022-50219
- Published
- Jun 18, 2025
- Updated
- Aug 5, 2026
- Vendor
- The Linux Kernel Organization
- Product
- Linux
- Classifications
- T1068
- Attack vector
- local
- Privileges
- authenticated
Timeline
How it unfolded
- Jun 18, 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=5.7
- Affected versionversion=af6eea57437a830293eab56246b6025cc7d46ee7 <1f8ca9c40e6222ce431e9ba5dae3cccce8ef9443
- Affected versionversion=af6eea57437a830293eab56246b6025cc7d46ee7 <3527e3cbb84d8868c4d4e91ba55915f96d39ec3d
- Affected versionversion=af6eea57437a830293eab56246b6025cc7d46ee7 <4c46091ee985ae84c60c5e95055d779fcd291d87
- Affected versionversion=af6eea57437a830293eab56246b6025cc7d46ee7 <6336388715afa419cc97d0255bda3bba1b96b7ca
- Affected versionversion=af6eea57437a830293eab56246b6025cc7d46ee7 <be001f9da71eaa3b61e186fb88bde3279728bdca
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.
Weakness, pattern, technique
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