CVE-2022-50219: bpf: Fix KASAN use-after-free Read in compute_effective_progs

Published Jun 18, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix KASAN use-after-free Read in computeeffectiveprogs

Syzbot found a Use After Free bug in computeeffectiveprogs(). The reproducer creates a number of BPF links, and causes a fault injected alloc to fail, while calling bpflinkdetach on them. Link detach triggers the link to be freed by bpflinkfree(), which calls cgroupbpfdetach() and updateeffectiveprogs(). If the memory allocation in this function fails, the function restores the pointer to the bpfcgrouplink on the cgroup list, but the memory gets freed just after it returns. After this, every subsequent call to updateeffectiveprogs() causes this already deallocated pointer to be dereferenced in proglistlength(), 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 cgroupbpfdetach() or cgroupbpfdetach() will correct it.

Affected Software

5 affected components
Linux Kernel
Linux Linux kernel>=5.7<5.10.138
Linux Linux kernel>=5.11<5.15.61
Linux Linux kernel>=5.16<5.18.18
Linux Linux kernel>=5.19<5.19.2

Event History

Jun 18, 2025
CVE Published
via MITRE·11:03 AM
Data Sourced
via MITRE·11:03 AM
DescriptionSeverity
Data Sourced
via NVD·11:15 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2022-50219?

CVE-2022-50219 is classified as a medium severity vulnerability due to potential use-after-free issues in the Linux kernel.

2

How do I fix CVE-2022-50219?

To fix CVE-2022-50219, update your Linux kernel to the latest patched version provided by your distribution.

3

What is the impact of CVE-2022-50219?

CVE-2022-50219 may allow an attacker to exploit use-after-free conditions, potentially leading to system crashes or arbitrary code execution.

4

Which versions of the Linux kernel are affected by CVE-2022-50219?

CVE-2022-50219 affects various versions of the Linux kernel that are susceptible to the use-after-free vulnerability, especially those prior to mitigative updates.

5

Is CVE-2022-50219 being actively exploited?

As of now, there are no confirmed instances of active exploitation of CVE-2022-50219, but it's advisable to apply patches promptly to mitigate risk.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203