CVE-2024-40909

Source
https://cve.org/CVERecord?id=CVE-2024-40909
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-40909.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-40909
Downstream
Related
Published
2024-07-12T12:20:48.447Z
Modified
2026-03-20T12:37:21.978948Z
Summary
bpf: Fix a potential use-after-free in bpf_link_free()
Details

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

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

After commit 1a80dbcb2dba, bpflink can be freed by link->ops->deallocdeferred, 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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40909.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
876941f533e7b47fc69977fc4551c02f2d18af97
Fixed
91cff53136daeff50816b0baeafd38a6976f6209
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce
Fixed
fa97b8fed9896f1e89cb657513e483a152d4c382
Fixed
2884dc7d08d98a89d8d65121524bb7533183a63a
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
5d8d447777564b35f67000e7838e7ccb64d525c8

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-40909.json"