← All CVEs

CVE-2024-40954

HIGH 7.8 ALL-YEARS

Published 2024-07-12 · Last modified 2026-08-05 · Linux · NVD: Modified

In the Linux kernel, the following vulnerability has been resolved: net: do not leave a dangling sk pointer, when socket creation fails It is possible to trigger a use-after-free by: * attaching an fentry probe to __sock_release() and the probe calling the bpf_get_socket_cookie() helper * running traceroute -I 1.1.1.1 on a freshly booted VM A KASAN enabled kernel will log something like below (decoded and stripped): ================================================================== BUG: KASAN: slab-use-after-free in __sock_gen_cookie (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2583 ./include/linux/atomic/atomic-instrumented.h:1611 net/core/sock_diag.c:29) Read of size 8 at addr ffff888007110dd8 by task traceroute/299 CPU: 2 PID: 299 Comm: traceroute Tainted: G E 6.10.0-rc2+ #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: <TASK> dump_stack_lvl (lib/dump_stack.c:117 (discriminator 1)) print_report (mm/kasan/report.c:378 mm/kasan/report.c:488) ? __sock_gen_cookie (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2583 ./include/linux/atomic/atomic-instrumented.h:1611 net/core/sock_diag.c:29) kasan_report (mm/kasan/report.c:603) ? __sock_gen_cookie (./arch/x86/include/asm/atomic64_64.h:15 ./include/linux/atomic/atomic-arch-fallback.h:2583 ./include/linux/atomic/atomic-instrumented.h:1611 net/core/sock_diag.c:29) k

ELEVATED IMPACT

Severe if exploited (CVSS 7.8), but no confirmed exploitation. Patch on a normal cadence.

Exploitation likelihood

0.3%chance of exploitation in 30 days · 17th percentile

○ In CISA KEV○ Catalogued PoC◆ SSVC: exploitation none, automatable no

Impact if exploited

7.8CVSS 3.1 · HIGH · CNA

  • ConfidentialityHigh
  • IntegrityHigh
  • AvailabilityHigh

What an attacker needs

  • ⚠Access: Requires local access to the host
  • ⚠Privileges: Requires a low-privilege account
  • ✓User interaction: No user interaction needed
  • ✓Complexity: No special conditions — reliably repeatable

✓ lowers the bar for an attacker · ⚠ raises it

Proof of concept

No public PoC is currently catalogued.

Search for new PoCs

Search GitHub now — results may be empty or unverified.

Tracked sources are checked weekly for the full archive, including PoCs published after the original disclosure. A later release appears after a tracked source lists it and a refresh succeeds.

Affected

Vendors Linux

Products Linux Linux Kernel

Weakness (CWE)

  • CWE-416: Use after free

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References and research data (JSON)

Vendor product assessments

Showing 32 of 501 vendor product statements; 469 omitted. Read the full vendor advisory.

  • bpftool-debuginfo-0:7.3.0-427.31.1.el9_4.aarch64 as a component of Red Hat Enterprise Linux AppStream (v. 9) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_4?arch=aarch64

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-rt-debug-debuginfo-0:5.14.0-427.31.1.el9_4.aarch64 as a component of Red Hat Enterprise Linux AppStream (v. 9) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_4?arch=aarch64

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • bpftool-debuginfo-0:4.18.0-553.22.1.el8_10.aarch64 as a component of Red Hat Enterprise Linux BaseOS (v. 8) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_10?arch=aarch64

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-debuginfo-0:4.18.0-553.22.1.el8_10.ppc64le as a component of Red Hat Enterprise Linux BaseOS (v. 8) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_10?arch=ppc64le

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • perf-0:4.18.0-553.22.1.el8_10.s390x as a component of Red Hat Enterprise Linux BaseOS (v. 8) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_10?arch=s390x

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-abi-stablelists-0:5.14.0-427.31.1.el9_4.noarch as a component of Red Hat Enterprise Linux BaseOS (v. 9) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_4?arch=noarch

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-modules-0:5.14.0-427.31.1.el9_4.aarch64 as a component of Red Hat Enterprise Linux BaseOS (v. 9) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_4?arch=aarch64

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • perf-debuginfo-0:5.14.0-427.31.1.el9_4.ppc64le as a component of Red Hat Enterprise Linux BaseOS (v. 9) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_4?arch=ppc64le

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-64k-debug-debuginfo-0:5.14.0-427.31.1.el9_4.aarch64 as a component of Red Hat Enterprise Linux CRB (v. 9) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_4?arch=aarch64

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • python3-perf-debuginfo-0:5.14.0-427.31.1.el9_4.ppc64le as a component of Red Hat Enterprise Linux CRB (v. 9) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_4?arch=ppc64le

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-tools-debuginfo-0:5.14.0-427.31.1.el9_4.x86_64 as a component of Red Hat Enterprise Linux NFV (v. 9) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_4?arch=x86_64

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • python3-perf-debuginfo-0:5.14.0-427.31.1.el9_4.x86_64 as a component of Red Hat Enterprise Linux RT (v. 9) · fixed

    Vendor assessment for this product only.

    pkg:rpm/redhat/[email protected]_4?arch=x86_64

    • vendor fix: For details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258 The system must be rebooted for this update to take effect. Vendor guidance
    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel as a component of Red Hat Enterprise Linux 6 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • no fix planned: Out of support scope
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-doc as a component of Red Hat Enterprise Linux 6 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel-doc

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • no fix planned: Out of support scope
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel.src as a component of Red Hat Enterprise Linux 6 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel?arch=src

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • no fix planned: Out of support scope
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-bootwrapper as a component of Red Hat Enterprise Linux 7 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel-bootwrapper

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • no fix planned: Out of support scope
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-kdump as a component of Red Hat Enterprise Linux 7 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel-kdump

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • no fix planned: Out of support scope
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-rt-devel as a component of Red Hat Enterprise Linux 7 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel-rt-devel

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • no fix planned: Out of support scope
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-rt-trace-kvm as a component of Red Hat Enterprise Linux 7 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel-rt-trace-kvm

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • no fix planned: Out of support scope
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • perf as a component of Red Hat Enterprise Linux 7 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/perf

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • no fix planned: Out of support scope
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-rt-debug-devel as a component of Red Hat Enterprise Linux 9 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel-rt-debug-devel

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • none available: Affected
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-rt-debug-modules-internal as a component of Red Hat Enterprise Linux 9 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel-rt-debug-modules-internal

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • none available: Affected
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-rt-modules as a component of Red Hat Enterprise Linux 9 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel-rt-modules

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • none available: Affected
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-rt.src as a component of Red Hat Enterprise Linux 9 · known affected

    Vendor assessment for this product only.

    pkg:rpm/redhat/kernel-rt?arch=src

    • workaround: Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
    • none available: Affected
    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-headers-0:5.14.0-427.31.1.el9_4.aarch64 as a component of Red Hat Enterprise Linux AppStream (v. 9) · known not affected

    Vendor assessment for this product only.

    Reason: vulnerable code not present

    pkg:rpm/redhat/[email protected]_4?arch=aarch64

    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-headers-0:5.14.0-427.31.1.el9_4.ppc64le as a component of Red Hat Enterprise Linux AppStream (v. 9) · known not affected

    Vendor assessment for this product only.

    Reason: vulnerable code not present

    pkg:rpm/redhat/[email protected]_4?arch=ppc64le

    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-headers-0:5.14.0-427.31.1.el9_4.s390x as a component of Red Hat Enterprise Linux AppStream (v. 9) · known not affected

    Vendor assessment for this product only.

    Reason: vulnerable code not present

    pkg:rpm/redhat/[email protected]_4?arch=s390x

    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-headers-0:5.14.0-427.31.1.el9_4.x86_64 as a component of Red Hat Enterprise Linux AppStream (v. 9) · known not affected

    Vendor assessment for this product only.

    Reason: vulnerable code not present

    pkg:rpm/redhat/[email protected]_4?arch=x86_64

    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-cross-headers-0:5.14.0-427.31.1.el9_4.aarch64 as a component of Red Hat Enterprise Linux CRB (v. 9) · known not affected

    Vendor assessment for this product only.

    Reason: vulnerable code not present

    pkg:rpm/redhat/[email protected]_4?arch=aarch64

    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-cross-headers-0:5.14.0-427.31.1.el9_4.ppc64le as a component of Red Hat Enterprise Linux CRB (v. 9) · known not affected

    Vendor assessment for this product only.

    Reason: vulnerable code not present

    pkg:rpm/redhat/[email protected]_4?arch=ppc64le

    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-cross-headers-0:5.14.0-427.31.1.el9_4.s390x as a component of Red Hat Enterprise Linux CRB (v. 9) · known not affected

    Vendor assessment for this product only.

    Reason: vulnerable code not present

    pkg:rpm/redhat/[email protected]_4?arch=s390x

    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00
  • kernel-cross-headers-0:5.14.0-427.31.1.el9_4.x86_64 as a component of Red Hat Enterprise Linux CRB (v. 9) · known not affected

    Vendor assessment for this product only.

    Reason: vulnerable code not present

    pkg:rpm/redhat/[email protected]_4?arch=x86_64

    Red Hat · CVE-2024-40954 · Updated 2026-08-04T18:37:45+00:00

Known Affected Software Configurations

VendorProductVersion range
LinuxLinux Kernel≥ 5.12 and < 5.15.162
LinuxLinux Kernel≥ 5.16 and < 6.1.96
LinuxLinux Kernel≥ 6.2 and < 6.6.36
LinuxLinux Kernel≥ 6.7 and < 6.9.7
LinuxLinux Kernel6.10
LinuxLinux Kernel6.10
LinuxLinux Kernel6.10
LinuxLinux Kernel6.10

All CVSS metrics

  • HIGH 7.8 v3.1 · CNA Primary
    CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • HIGH 7.8 v3.1 · NVD Secondary
    CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References

Patches & mitigations

Advisories

Technical & other

Sources: NVD · CVE.org · All sources and attribution · EPSS