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.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.2%top 85.6% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12linux6.0.2-1DEBIAN-CVE-2022-50219
Debian:13linux6.0.2-1DEBIAN-CVE-2022-50219
Debian:14linux6.0.2-1DEBIAN-CVE-2022-50219
Ubuntu:22.04:LTSlinux5.15.0-53.59UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-aws5.15.0-1023.27UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-azure5.15.0-1023.29UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-azure-fde5.15.0-1024.30.1UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-gcp5.15.0-1022.29UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-gke5.15.0-1020.25UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-gkeop5.15.0-1008.12UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-ibm5.15.0-1018.21UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-intel-iotg5.15.0-1018.23UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-kvm5.15.0-1021.26UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-lowlatency5.15.0-53.59UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-nvidia5.15.0-1015.15UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-oracle5.15.0-1022.28UBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-raspi5.15.0-1018.20UBUNTU-CVE-2022-50219
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2022-50219
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2022-50219
Ubuntu:24.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2022-50219
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2022-50219

Affected products (as reported)

VendorProductVersions
Linux Linux af6eea57437a830293eab56246b6025cc7d46ee7 – before 3527e3cbb84d8868c4d4e91ba55915f96d39ec3daf6eea57437a830293eab56246b6025cc7d46ee7 – before 1f8ca9c40e6222ce431e9ba5dae3cccce8ef9443af6eea57437a830293eab56246b6025cc7d46ee7 – before 6336388715afa419cc97d0255bda3bba1b96b7caaf6eea57437a830293eab56246b6025cc7d46ee7 – before be001f9da71eaa3b61e186fb88bde3279728bdcaaf6eea57437a830293eab56246b6025cc7d46ee7 – before 4c46091ee985ae84c60c5e95055d779fcd291d87
Linux Linux 5.7

References