Vulnerability · Published Jun 18, 2025 · Assigned by Linux
CVE-2022-50219bpf: Fix KASAN use-after-free Read in compute_effective_progs
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 14% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix KASAN use-after-free Read in compute_effective_progs Syzbot found a Use After Free bug in compute_effective_progs(). The reproducer creates a number of BPF links, and causes a fault injected alloc to fail, while calling bpf_link_detach on them. Link detach triggers the link to be freed by bpf_link_free(), which calls __cgroup_bpf_detach() and update_effective_progs(). If the memory allocation in this function fails, the function restores the pointer to the bpf_cgroup_link on the cgroup list, but the memory gets freed just after it returns. After this, every subsequent call to update_effective_progs() causes this already deallocated pointer to be dereferenced in prog_list_length(), and triggers KASAN UAF error. To fix this issue don't preserve the pointer to the prog or link in the list, but remove it and replace it with a dummy prog without shrinking the table. The subsequent call to __cgroup_bpf_detach() or __cgroup_bpf_detach() will correct it.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.0.2-1 | DEBIAN-CVE-2022-50219 |
| Debian:13 | linux | 6.0.2-1 | DEBIAN-CVE-2022-50219 |
| Debian:14 | linux | 6.0.2-1 | DEBIAN-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux | 5.15.0-53.59 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1023.27 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1023.29 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1024.30.1 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1022.29 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1020.25 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1008.12 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1018.21 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1018.23 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1021.26 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-53.59 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1015.15 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1022.28 | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1018.20 | UBUNTU-CVE-2022-50219 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2022-50219 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2022-50219 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | af6eea57437a830293eab56246b6025cc7d46ee7 – before 3527e3cbb84d8868c4d4e91ba55915f96d39ec3daf6eea57437a830293eab56246b6025cc7d46ee7 – before 1f8ca9c40e6222ce431e9ba5dae3cccce8ef9443af6eea57437a830293eab56246b6025cc7d46ee7 – before 6336388715afa419cc97d0255bda3bba1b96b7caaf6eea57437a830293eab56246b6025cc7d46ee7 – before be001f9da71eaa3b61e186fb88bde3279728bdcaaf6eea57437a830293eab56246b6025cc7d46ee7 – before 4c46091ee985ae84c60c5e95055d779fcd291d87 |
| Linux | Linux | 5.7 |
References
- https://git.kernel.org/stable/c/3527e3cbb84d8868c4d4e91ba55915f96d39ec3d
- https://git.kernel.org/stable/c/1f8ca9c40e6222ce431e9ba5dae3cccce8ef9443
- https://git.kernel.org/stable/c/6336388715afa419cc97d0255bda3bba1b96b7ca
- https://git.kernel.org/stable/c/be001f9da71eaa3b61e186fb88bde3279728bdca
- https://git.kernel.org/stable/c/4c46091ee985ae84c60c5e95055d779fcd291d87