# CVE-2024-40909: bpf: Fix a potential use-after-free in bpf\_link\_free()

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-07-12 · Modified: 2026-10-30
- Aliases: SUSE-SU-2024:3322-1, SUSE-SU-2024:3387-1, SUSE-SU-2024:3398-1, UBUNTU-CVE-2024-40909, DEBIAN-CVE-2024-40909, openSUSE-SU-2024:14267-1
- Record: https://cvemate.com/vulnerability/CVE-2024-40909 · JSON: https://cvemate.com/vulnerability/CVE-2024-40909/json

## Description

```text
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.
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.279%, percentile 21.692%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 91)

- debian linux (Debian): \< 6.9.7-1
- ubuntu linux (Ubuntu): \< 6.8.0-44.44
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 6.8.0-1015.16
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): \< 6.8.0-1015.16~22.04.1
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1014.16
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-6.8 (Ubuntu): \< 6.8.0-1014.16~22.04.1

## References

- <https://git.kernel.org/stable/c/91cff53136daeff50816b0baeafd38a6976f6209>
- <https://git.kernel.org/stable/c/fa97b8fed9896f1e89cb657513e483a152d4c382>
- <https://git.kernel.org/stable/c/2884dc7d08d98a89d8d65121524bb7533183a63a>
- <https://www.suse.com/support/update/announcement/2024/suse-su-20243322-1/>
- <https://bugzilla.suse.com/1228349>
- <https://www.suse.com/security/cve/CVE-2024-40909>
- <https://www.suse.com/support/update/announcement/2024/suse-su-20243387-1/>
- <https://www.suse.com/support/update/announcement/2024/suse-su-20243398-1/>
- <https://ubuntu.com/security/CVE-2024-40909>
- <https://www.cve.org/CVERecord?id=CVE-2024-40909>
- <https://git.kernel.org/linus/2884dc7d08d98a89d8d65121524bb7533183a63a>
- <https://ubuntu.com/security/notices/USN-6999-1>
- <https://ubuntu.com/security/notices/USN-7004-1>
- <https://ubuntu.com/security/notices/USN-7005-1>
- <https://ubuntu.com/security/notices/USN-7008-1>
- <https://ubuntu.com/security/notices/USN-7005-2>
- <https://ubuntu.com/security/notices/USN-6999-2>
- <https://ubuntu.com/security/notices/USN-7029-1>
- <https://security-tracker.debian.org/tracker/CVE-2024-40909>
- <https://git.kernel.org/stable/c/e8ccda39b395169622855607085cdeef4d376e0f>

---

Data as of 2026-12-05T14:13:06.391Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
