{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-40909","id":"CVE-2024-40909","title":"bpf: Fix a potential use-after-free in bpf_link_free()","description":"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->ops->dealloc_deferred, but the code still tests and uses\nlink->ops->dealloc 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 instea","descriptionLong":"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->ops->dealloc_deferred, but the code still tests and uses\nlink->ops->dealloc 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.","published":"2024-07-12T12:20:48.447Z","updated":"2026-11-17T07:02:58.283313324Z","reserved":"2024-07-12T12:17:45.580Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ac48dc6ac9240f73bf08d29edf65c2deca93ee5d","lessThan":"e8ccda39b395169622855607085cdeef4d376e0f","status":"affected","versionType":"git"},{"version":"876941f533e7b47fc69977fc4551c02f2d18af97","lessThan":"91cff53136daeff50816b0baeafd38a6976f6209","status":"affected","versionType":"git"},{"version":"1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce","lessThan":"fa97b8fed9896f1e89cb657513e483a152d4c382","status":"affected","versionType":"git"},{"version":"1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce","lessThan":"2884dc7d08d98a89d8d65121524bb7533183a63a","status":"affected","versionType":"git"},{"version":"5d8d447777564b35f67000e7838e7ccb64d525c8","status":"affected","versionType":"git"},{"version":"6.6.26","lessThan":"6.6.35","status":"affected","versionType":"semver"},{"version":"6.8.5","lessThan":"6.9","status":"affected","versionType":"semver"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","lessThan":"6.9","status":"unaffected","versionType":"semver"},{"version":"6.6.35","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.9.6","lessThanOrEqual":"6.9.*","status":"unaffected","versionType":"semver"},{"version":"6.10","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/e8ccda39b395169622855607085cdeef4d376e0f","tags":["web"]},{"url":"https://git.kernel.org/stable/c/91cff53136daeff50816b0baeafd38a6976f6209","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/fa97b8fed9896f1e89cb657513e483a152d4c382","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/2884dc7d08d98a89d8d65121524bb7533183a63a","tags":["x_transferred","Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40909.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40909","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00278,"epssPercentile":0.20467,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-40909","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-40909","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-40909","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-40909","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}