CVE-2024-40909
kernel: bpf: Fix a potential use-after-free in bpf_link_free()
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · July 12, 2024
Updated · August 5, 2026
Description
The Linux kernel vulnerability related to bpf_link_free() involved a potential use-after-free condition. After commit 1a80dbcb2dba, the bpf_link could be freed via link->ops->dealloc_deferred, but the code erroneously continued to reference link->ops->dealloc. This dual reference risked accessing freed memory, leading to undefined behavior.
Statement
Red Hat Enterprise Linux is not vulnerable to this CVE, as it does not affect the versions or configurations of the Linux kernel used in its distributions.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
CVSS / CWE
CVSS 3.1 · 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE-416 · Use After Free