# netns: Make get_net_ns() handle zero refcount net

CVE record · `CVE-2024-40958`

- **Identifiers:** `CVE-2024-40958`
- **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:** 15 Oct 2026
- **Reviewed by a person:** No

Published by the CVE Program (CNA: Linux) at 12 Jul 2024, 12:32 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: `0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f to before 3a6cd326ead7c8bb1f64486789a01974a9f1ad55` (git)
  - affected: `0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f to before 2b82028a1f5ee3a8e04090776b10c534144ae77b` (git)
  - affected: `0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f to before cb7f811f638a14590ff98f53c6dd1fb54627d940` (git)
  - affected: `0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f to before 1b631bffcb2c09551888f3c723f4365c91fe05ef` (git)
  - affected: `0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f to before ef0394ca25953ea0eddcc82feae1f750451f1876` (git)
  - affected: `0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f to before 3af28df0d883e8c89a29ac31bc65f9023485743b` (git)
  - affected: `0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f to before ff960f9d3edbe08a736b5a224d91a305ccc946b0` (git)
  - Other versions: unaffected
- Vendor: Linux. Product: Linux.
  - affected: `5.2`
  - unaffected: `before 5.2` (semver)
  - unaffected: `5.4.279 to 5.4.*, inclusive` (semver)
  - unaffected: `5.10.221 to 5.10.*, inclusive` (semver)
  - unaffected: `5.15.162 to 5.15.*, inclusive` (semver)
  - unaffected: `6.1.96 to 6.1.*, inclusive` (semver)
  - unaffected: `6.6.36 to 6.6.*, inclusive` (semver)
  - unaffected: `6.9.7 to 6.9.*, inclusive` (semver)
  - unaffected: `6.10 to *, inclusive` (original_commit_for_fix)
  - Other versions: affected

## 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.0027, the 19th 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-40958](https://www.cve.org/CVERecord?id=CVE-2024-40958)
- [NVD: CVE-2024-40958](https://nvd.nist.gov/vuln/detail/CVE-2024-40958)

### References from the CNA

- <https://git.kernel.org/stable/c/3a6cd326ead7c8bb1f64486789a01974a9f1ad55>
- <https://git.kernel.org/stable/c/2b82028a1f5ee3a8e04090776b10c534144ae77b>
- <https://git.kernel.org/stable/c/cb7f811f638a14590ff98f53c6dd1fb54627d940>
- <https://git.kernel.org/stable/c/1b631bffcb2c09551888f3c723f4365c91fe05ef>
- <https://git.kernel.org/stable/c/ef0394ca25953ea0eddcc82feae1f750451f1876>
- <https://git.kernel.org/stable/c/3af28df0d883e8c89a29ac31bc65f9023485743b>
- <https://git.kernel.org/stable/c/ff960f9d3edbe08a736b5a224d91a305ccc946b0>

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-40958>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

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