{"id":"CVE-2024-40909","summary":"bpf: Fix a potential use-after-free in bpf_link_free()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Fix a potential use-after-free in bpf_link_free()\n\nAfter commit 1a80dbcb2dba, bpf_link can be freed by\nlink-\u003eops-\u003edealloc_deferred, but the code still tests and uses\nlink-\u003eops-\u003edealloc afterward, which leads to a use-after-free as\nreported by syzbot. Actually, one of them should be sufficient, so\njust call one of them instead of both. Also add a WARN_ON() in case\nof any problematic implementation.","modified":"2026-04-02T12:17:20.988041Z","published":"2024-07-12T12:20:48.447Z","related":["SUSE-SU-2024:2894-1","SUSE-SU-2024:2939-1","SUSE-SU-2024:2947-1","SUSE-SU-2024:3194-1","SUSE-SU-2024:3195-1","SUSE-SU-2024:3319-1","SUSE-SU-2024:3322-1","SUSE-SU-2024:3350-1","SUSE-SU-2024:3383-1","SUSE-SU-2024:3387-1","SUSE-SU-2024:3398-1","SUSE-SU-2024:3468-1","SUSE-SU-2024:3626-1","SUSE-SU-2024:3627-1","SUSE-SU-2024:3636-1","SUSE-SU-2024:3702-1","SUSE-SU-2024:3708-1","SUSE-SU-2024:3833-1","SUSE-SU-2024:3835-1","SUSE-SU-2024:3840-1","SUSE-SU-2024:3856-1","SUSE-SU-2024:3882-1","SUSE-SU-2024:3884-1","SUSE-SU-2024:4127-1","SUSE-SU-2024:4128-1","SUSE-SU-2024:4139-1","SUSE-SU-2024:4209-1","SUSE-SU-2024:4210-1","SUSE-SU-2024:4228-1","SUSE-SU-2025:0084-1","SUSE-SU-2025:0138-1","SUSE-SU-2025:0168-1","SUSE-SU-2025:0188-1","SUSE-SU-2025:0260-1","SUSE-SU-2025:0262-1","SUSE-SU-2025:0265-1","SUSE-SU-2025:0269-1","SUSE-SU-2025:20044-1","SUSE-SU-2025:20047-1","openSUSE-SU-2024:14267-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40909.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/2884dc7d08d98a89d8d65121524bb7533183a63a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/91cff53136daeff50816b0baeafd38a6976f6209"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fa97b8fed9896f1e89cb657513e483a152d4c382"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40909.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40909"},{"type":"PACKAGE","url":"https://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"},{"last_affected":"5d8d447777564b35f67000e7838e7ccb64d525c8"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-40909.json"}}],"schema_version":"1.7.5"}