CVE-2024-40909
bpf: Fix a potential use-after-free in bpf_link_free()
Mitigation
- Upgrade Linux to 6.9 or later.
Who should check
- Anyone running Linux >= ac48dc6ac9240f73bf08d29edf65c2deca93ee5d, < e8ccda39b395169622855607085cdeef4d376e0f; >= 876941f533e7b47fc69977fc4551c02f2d18af97, < 91cff53136daeff50816b0baeafd38a6976f6209; >= 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce, < fa97b8fed9896f1e89cb657513e483a152d4c382; >= 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce, < 2884dc7d08d98a89d8d65121524bb7533183a63a; 5d8d447777564b35f67000e7838e7ccb64d525c8; >= 6.6.26, < 6.6.35; >= 6.8.5, < 6.9
- Anyone running Linux 6.9
Vulnerability facts
- Affected
- Linux >= ac48dc6ac9240f73bf08d29edf65c2deca93ee5d, < e8ccda39b395169622855607085cdeef4d376e0f; >= 876941f533e7b47fc69977fc4551c02f2d18af97, < 91cff53136daeff50816b0baeafd38a6976f6209; >= 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce, < fa97b8fed9896f1e89cb657513e483a152d4c382; >= 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce, < 2884dc7d08d98a89d8d65121524bb7533183a63a; 5d8d447777564b35f67000e7838e7ccb64d525c8; >= 6.6.26, < 6.6.35; >= 6.8.5, < 6.9; Linux 6.9
- Fixed in
- Linux 91cff53136daeff50816b0baeafd38a6976f6209, Linux 2884dc7d08d98a89d8d65121524bb7533183a63a, Linux 6.6.35, Linux 6.9
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.32% chance of exploitation in 30 days (percentile 17, 2026-11-26)
- CWE
- CWE-416
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= ac48dc6ac9240f73bf08d29edf65c2deca93ee5d, < e8ccda39b395169622855607085cdeef4d376e0f; >= 876941f533e7b47fc69977fc4551c02f2d18af97, < 91cff53136daeff50816b0baeafd38a6976f6209; >= 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce, < fa97b8fed9896f1e89cb657513e483a152d4c382; >= 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce, < 2884dc7d08d98a89d8d65121524bb7533183a63a; 5d8d447777564b35f67000e7838e7ccb64d525c8; >= 6.6.26, < 6.6.35; >= 6.8.5, < 6.9 | — | cvelist |
| Linux | 6.9 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-40909. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-40909.md Affected: Linux >= ac48dc6ac9240f73bf08d29edf65c2deca93ee5d, < e8ccda39b395169622855607085cdeef4d376e0f; >= 876941f533e7b47fc69977fc4551c02f2d18af97, < 91cff53136daeff50816b0baeafd38a6976f6209; >= 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce, < fa97b8fed9896f1e89cb657513e483a152d4c382; >= 1a80dbcb2dbaf6e4c216e62… Fixed in: Linux 91cff53136daeff50816b0baeafd38a6976f6209, Linux 2884dc7d08d98a89d8d65121524bb7533183a63a, Linux 6.6.35, Linux 6.9 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
FAQ
Is CVE-2024-40909 being exploited?
There is no confirmed exploitation: CVE-2024-40909 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-40909?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2024-40909?
Linux >= ac48dc6ac9240f73bf08d29edf65c2deca93ee5d, < e8ccda39b395169622855607085cdeef4d376e0f; >= 876941f533e7b47fc69977fc4551c02f2d18af97, < 91cff53136daeff50816b0baeafd38a6976f6209; >= 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce, < fa97b8fed9896f1e89cb657513e483a152d4c382; >= 1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce, < 2884dc7d08d98a89d8d65121524bb7533183a63a; 5d8d447777564b35f67000e7838e7ccb64d525c8; >= 6.6.26, < 6.6.35; >= 6.8.5, < 6.9; Linux 6.9.
Is there a fix for CVE-2024-40909?
Yes. Fixed in Linux 91cff53136daeff50816b0baeafd38a6976f6209, Linux 2884dc7d08d98a89d8d65121524bb7533183a63a, Linux 6.6.35, Linux 6.9. Upgrade Linux to 6.9 or later.
How do I check if I'm affected by CVE-2024-40909?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.