CVE-2024-40958

Kernel memory corruption via stale netns reference

Published Jul 12, 2024 · Updated Aug 5, 2026

Use-after-free in Linux kernel 5.2 through 6.9.6 allows local users to corrupt kernel memory through a TUN device ioctl. get_net_ns() unconditionally increments a network namespace reference after another namespace releases its final reference. The trigger requires a TUN file descriptor and network-namespace reassignment; panic-on-warning systems halt on the resulting warning.

CVSS severity7.8
High
EPSS probability0.27%
Next 30 days · Sep 16, 2026
Known exploitationUnconfirmed
Based on sourced intelligence
Hinoki checkNot available
Coverage for this vulnerability

See if you're affected

Explore vulnerability checks for your environment with Hinoki.

Book a demo

Summary

What happened

Use-after-free in Linux kernel 5.2 through 6.9.6 allows local users to corrupt kernel memory through a TUN device ioctl. get_net_ns() unconditionally increments a network namespace reference after another namespace releases its final reference. The trigger requires a TUN file descriptor and network-namespace reassignment; panic-on-warning systems halt on the resulting warning.

The record

CVE
CVE-2024-40958
Published
Jul 12, 2024
Updated
Aug 5, 2026
Vendor
Siemens
Product
SIMATIC S7-1500 TM MFP - GNU/Linux subsystem
Classifications
CWE-416, T1499.004
Attack vector
local
Privileges
unauthenticated

Timeline

How it unfolded

  1. Jul 12, 2024CVE publishedPublication date reported by the CVE source.
  2. Aug 5, 2026Record updatedLatest update available in the CVE record.

Exploitability

Present is not the same as exploitable

Compare your product and version with the public record. A matching version still requires validation against your environment.

Is a vulnerable build present?

Compare these published version ranges with your installed build and any vendor patches.

  1. Affected versionversion=0 <*

What conditions does exploitation require?

Attack vectorlocal
Required privilegesunauthenticated

What is affected?

Siemens · SIMATIC S7-1500 TM MFP - GNU/Linux subsystemversion=0 <*
The Linux Kernel Organization · Linuxversion=0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f <1b631bffcb2c09551888f3c723f4365c91fe05ef; version=0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f <2b82028a1f5ee3a8e04090776b10c534144ae77b; version=0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f <3a6cd326ead7c8bb1f64486789a01974a9f1ad55; version=0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f <3af28df0d883e8c89a29ac31bc65f9023485743b; version=0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f <cb7f811f638a14590ff98f53c6dd1fb54627d940; version=0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f <ef0394ca25953ea0eddcc82feae1f750451f1876; version=0c3e0e3bb623c3735b8c9ab8aa8332f944f83a9f <ff960f9d3edbe08a736b5a224d91a305ccc946b0; version=5.2
Siemens · SCALANCE XCM/XRM/XCH/XRH-300 familyversion=0 <V3.1
Siemens · RUGGEDCOM RST2428Pversion=0 <V3.1

Published CVSS scores

7.8NVDCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0Siemens ProductCERTCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

CVSS describes severity. EPSS estimates exploitation probability.

Attacks

What attackers are doing with it

Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.

Daily unique IPsNo honeypot observations are available for this CVE in the selected window.

No observations available

Sep 10, 2026Sep 16, 2026
Latest reporting daySep 16, 2026
Latest daily unique IPsUnavailable
Prior 30-day averageUnavailable
SourceShadowserver honeypots (KEV)
Vectorlocal
Privilegesunauthenticated
Known exploitationUnconfirmed
Public exploitUnconfirmed

Weakness, pattern, technique

CWE-416Use After Free
T1499.004Application or System Exploitation

Public exploit references

No public exploit references are available in this record.

Labels summarize the accepted research assessment. They do not indicate a test against your environment.

Technologies

Your stack

See the directory against your own environment.

Your stack

Check the software in your environment

Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.

Book a demo