Skip to main content
VulnerabilityPublished Updated

CVE-2024-40954: Linux kernel · net: do not leave a dangling sk pointer, when socket creation fails

Affects Linux kernelSource GCVE Database

0

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

CVSS 3.1 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 12 Jul 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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.

Affected software

ProductAffectedFixed in
Ubuntu 24.04 LTSlinuxpkg:deb/ubuntu/linux?arch=source&distro=nobleOther threatsAffected
  • 6.5.0-9.9 – 6.8.0-147.147
59 affected builds
Fixed in–
Ubuntu 24.04 LTSlinux-awspkg:deb/ubuntu/linux-aws?arch=source&distro=nobleOther threatsAffected
  • 6.5.0-1008.8 – 6.8.0-1067.70
55 affected builds
Fixed in–
Ubuntu 24.04 LTSlinux-azurepkg:deb/ubuntu/linux-azure?arch=source&distro=nobleOther threatsAffected
  • 6.5.0-1007.7 – 6.8.0-1071.79
46 affected builds
Fixed in–
Ubuntu 24.04 LTSlinux-azure-6.11pkg:deb/ubuntu/linux-azure-6.11?arch=source&distro=nobleOther threatsAffected
  • 6.11.0-1008.8~24.04.1 – 6.11.0-1018.18~24.04.1
7 affected builds
Fixed in–
Ubuntu 24.04 LTSlinux-azure-fdepkg:deb/ubuntu/linux-azure-fde?arch=source&distro=nobleOther threatsAffected
  • 6.8.0-1041.48 – 6.8.0-1069.76
13 affected builds
Fixed in–
Ubuntu 24.04 LTSlinux-azure-nvidiapkg:deb/ubuntu/linux-azure-nvidia?arch=source&distro=nobleOther threatsAffected
  • 6.8.0-1013.14 – 6.8.0-1039.42
10 affected builds
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

Community reviews

Loading reviews…