Bug 2297493 (CVE-2024-40909) - CVE-2024-40909 kernel: bpf: Fix a potential use-after-free in bpf_link_free()
Summary: CVE-2024-40909 kernel: bpf: Fix a potential use-after-free in bpf_link_free()
Keywords:
Status: NEW
Alias: CVE-2024-40909
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-07-12 13:27 UTC by OSIDB Bzimport
Modified: 2024-08-13 07:30 UTC (History)
4 users (show)

Fixed In Version: kernel 6.6.35, kernel 6.9.6, kernel 6.10-rc3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-07-12 13:27:07 UTC
In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix a potential use-after-free in bpf_link_free()

After commit 1a80dbcb2dba, bpf_link can be freed by
link->ops->dealloc_deferred, but the code still tests and uses
link->ops->dealloc afterward, which leads to a use-after-free as
reported by syzbot. Actually, one of them should be sufficient, so
just call one of them instead of both. Also add a WARN_ON() in case
of any problematic implementation.


Note You need to log in before you can comment on or make changes to this bug.