PT-2024-7046 · Linux+10 · Linux Kernel+10
Published
2024-06-18
·
Updated
2025-09-29
·
CVE-2024-40958
CVSS v3.1
7.8
High
| Vector | AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
Linux kernel versions prior to 6.10.0-rc3
Description
The vulnerability is related to the
get net ns() function in the Linux kernel, which fails to handle a zero refcount net. This can lead to a use-after-free condition, causing a kernel panic. The issue is triggered when the tun set iff() function is called with a device set to tun0, followed by setting the network namespace of tun0 to ns1 and then putting the network reference count to zero. The tun chr ioctl() function is then called with the TUNGETDEVNETNS command, which attempts to access the network namespace, resulting in a kernel panic.Recommendations
To resolve this issue, update the Linux kernel to a version that includes the fix for the
get net ns() function. Alternatively, as a temporary workaround, consider disabling the tun module or restricting access to the TUNGETDEVNETNS command until a patched kernel is available.Note: The provided information does not specify the exact version that includes the fix, so it is recommended to update to the latest available kernel version.
Exploit
Fix
DoS
Use After Free
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Alt Linux
Almalinux
Astra Linux
Centos
Linuxmint
Linux Kernel
Red Hat
Red Os
Rocky Linux
Suse
Ubuntu