CVE-2024-40909
bpf: Fix a potential use-after-free in bpf_link_free()
Reported by linux · Published July 12, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| linux_kernel | linux | 6.9.6, 6.6.35 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | ac48dc6ac9240f73bf08d29edf65c2deca93ee5d, 876941f533e7b47fc69977fc4551c02f2d18af97, 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce |
| Linux | Linux | 6.9, 0, 6.6.35 |
| linux | linux_kernel | 6.6.26, 6.9, 6.9 |
| Linux | Linux | *, 876941f533e7b47fc69977fc4551c02f2d18af97, 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce |
Timeline
- Jul 12, 2024 CVE Published
- Jul 13, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (8 in total, the first dated here)
- Jan 7, 2026 Security Advisory (271 in total, the first dated here)
- Mar 30, 2026 Distribution Patch (174 in total, the first dated here)
- Oct 30, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-40909
vulnetix vdb fixes CVE-2024-40909
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-40909/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart