# bpf: Fix a potential use-after-free in bpf_link_free()

CVE record · `CVE-2024-40909`

- **Identifiers:** `CVE-2024-40909`
- **State:** Confirmed
- **Severity:** CVSS 7.8 High
- **Critical:** No
- **CNA:** Linux
- **Technologies:** [Linux kernel](https://agentprime.io/advisories/technology/linux-kernel.md)
- **Published:** 12 Jul 2024
- **Updated:** 30 Oct 2026
- **Reviewed by a person:** No

Published by the CVE Program (CNA: Linux) at 12 Jul 2024, 12:20 UTC. agentprime has not analysed this yet, so whether it affects any app is not known. This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it.

## Affected products, as the CNA wrote them

- Vendor: Linux. Product: Linux.
  - affected: `ac48dc6ac9240f73bf08d29edf65c2deca93ee5d to before e8ccda39b395169622855607085cdeef4d376e0f` (git)
  - affected: `876941f533e7b47fc69977fc4551c02f2d18af97 to before 91cff53136daeff50816b0baeafd38a6976f6209` (git)
  - affected: `1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce to before fa97b8fed9896f1e89cb657513e483a152d4c382` (git)
  - affected: `1a80dbcb2dbaf6e4c216e62e30fa7d3daa8001ce to before 2884dc7d08d98a89d8d65121524bb7533183a63a` (git)
  - affected: `5d8d447777564b35f67000e7838e7ccb64d525c8` (git)
  - affected: `6.6.26 to before 6.6.35` (semver)
  - affected: `6.8.5 to before 6.9` (semver)
  - Other versions: unaffected
- Vendor: Linux. Product: Linux.
  - affected: `6.9`
  - unaffected: `before 6.9` (semver)
  - unaffected: `6.6.35 to 6.6.*, inclusive` (semver)
  - unaffected: `6.9.6 to 6.9.*, inclusive` (semver)
  - unaffected: `6.10 to *, inclusive` (original_commit_for_fix)
  - Other versions: affected

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> The Linux kernel is affected in versions 6.6.26 before 6.6.35 and 6.9 before 6.9.6. A use-after-free in the BPF subsystem's bpf_link_free() function can occur. The source gives few details on what an attacker needs. Upgrade to Linux 6.6.35, 6.9.6, or 6.10 or later.

Written 13 Nov 2026.

## Not analysed yet

We haven’t published our own analysis of this CVE. If a person reviews it, this page will say what’s affected and what has to be true for it to matter.

## Severity and exploitation

- 7.8 High, CVSS 3.1: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`, from CNA (Linux)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0028, the 20th percentile, on 21 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

This record came from the full history of the CVE Program, published 12 Jul 2024. New records show when each source confirmed them.

## Sources

- [CVE List: CVE-2024-40909](https://www.cve.org/CVERecord?id=CVE-2024-40909)
- [NVD: CVE-2024-40909](https://nvd.nist.gov/vuln/detail/CVE-2024-40909)

### References from the CNA

- <https://git.kernel.org/stable/c/e8ccda39b395169622855607085cdeef4d376e0f>
- <https://git.kernel.org/stable/c/91cff53136daeff50816b0baeafd38a6976f6209>
- <https://git.kernel.org/stable/c/fa97b8fed9896f1e89cb657513e483a152d4c382>
- <https://git.kernel.org/stable/c/2884dc7d08d98a89d8d65121524bb7533183a63a>

Facts on this page come from the CVE List as the CNA published them, with CVSS from the sources named above, CISA KEV and FIRST EPSS. Vendors, products and versions are shown as the CNA wrote them. We don’t reproduce the CVE’s description.

## Check whether this affects you

This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it. Compare the affected versions above with what you run.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), `get_advisory` returns this record and `search_advisories` finds related ones. Setup: <https://agentprime.io/mcp.md>
- As JSON: <https://api.agentprime.io/v1/advisories/CVE-2024-40909>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

The web page: <https://agentprime.io/advisories/CVE-2024-40909/>. Everything for agents: <https://agentprime.io/llms.txt>.
