CVE-2024-40954: Linux kernel · net: do not leave a dangling sk pointer, when socket creation fails
Affects Linux kernelSource GCVE Database
Not known to be exploited · CVSS 7.8 High : upgrade to 5.15.0-1052.59~20.04.1 soon.
Data as of 28 Oct 2026, 11:00 UTC
- Patch
- Available – fixed in 5.15.0-1052.59~20.04.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 12 Jul 2024
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade the Ubuntu linux-gkeop-5.15 package to 5.15.0-1052.59~20.04.1.
Patches and advisories
- ubuntu.com/security/notices/USN-6999-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7004-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7005-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7008-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7005-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-7009-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7019-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-6999-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-3 (opens in a new tab)
- ubuntu.com/security/notices/USN-7029-1 (opens in a new tab)
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 24.04 LTSlinuxpkg:deb/ubuntu/linux?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlinux-awspkg:deb/ubuntu/linux-aws?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlinux-azurepkg:deb/ubuntu/linux-azure?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlinux-azure-6.11pkg:deb/ubuntu/linux-azure-6.11?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlinux-azure-fdepkg:deb/ubuntu/linux-azure-fde?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSlinux-azure-nvidiapkg:deb/ubuntu/linux-azure-nvidia?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available and has been released in Linux kernel version 5.15.0-1052.59~20.04.1. Users and administrators should update their Linux kernel to this version or later to remediate the vulnerability. No additional mitigation steps are required beyond applying the official fix.
Description
CVE-2024-40954 is a use-after-free vulnerability in the Linux kernel's networking subsystem. It occurs when a socket creation fails and leaves a dangling socket pointer, which can be triggered by attaching an fentry probe to __sock_release() and invoking bpf_get_socket_cookie(), or by running traceroute on a freshly booted VM. The flaw was detected by KASAN and is fixed by clearing the socket reference in sk_common_release() to prevent use-after-free conditions. This vulnerability has a high severity score and affects multiple Linux kernel versions prior to 5.15.0-1052.59~20.04.1. A patch is available and included in the fixed kernel version.
References
- ubuntu.com/security/CVE-2024-40954 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2024-40954 (opens in a new tab)
- git.kernel.org/linus/6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2 (opens in a new tab)
- git.kernel.org/stable/c/78e4aa528a7b1204219d808310524344f627d069 (opens in a new tab)
- git.kernel.org/stable/c/893eeba94c40d513cd0fe6539330ebdaea208c0e (opens in a new tab)
- git.kernel.org/stable/c/454c454ed645fed051216b79622f7cb69c1638f5 (opens in a new tab)
- git.kernel.org/stable/c/5dfe2408fd7dc4d2e7ac38a116ff0a37b1cfd3b9 (opens in a new tab)
- git.kernel.org/stable/c/6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2 (opens in a new tab)
- ubuntu.com/security/notices/USN-6999-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7004-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7005-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7008-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7005-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-7009-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7019-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-6999-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-7007-3 (opens in a new tab)
- ubuntu.com/security/notices/USN-7029-1 (opens in a new tab)