Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2024-40958

7.8 · HIGH
Published Jul 12, 2024 linux CWE-416 EPSS 0.27% (19th pctl)

Overview

CVE-2024-40958 is a high-severity vulnerability affecting linux linux_kernel. It was published on July 12, 2024 and has a CVSS 3.1 base score of 7.8 (HIGH).

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

Technical Description

In the Linux kernel, the following vulnerability has been resolved:

netns: Make get_net_ns() handle zero refcount net

Syzkaller hit a warning:

refcount_t: addition on 0; use-after-free.

WARNING: CPU: 3 PID: 7890 at lib/refcount.c:25 refcount_warn_saturate+0xdf/0x1d0

Modules linked in:

CPU: 3 PID: 7890 Comm: tun Not tainted 6.10.0-rc3-00100-gcaa4f9578aba-dirty #310

Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014

RIP: 0010:refcount_warn_saturate+0xdf/0x1d0

Code: 41 49 04 31 ff 89 de e8 9f 1e cd fe 84 db 75 9c e8 76 26 cd fe c6 05 b6 41 49 04 01 90 48 c7 c7 b8 8e 25 86 e8 d2 05 b5 fe 90 <0f> 0b 90 90 e9 79 ff ff ff e8 53 26 cd fe 0f b6 1

RSP: 0018:ffff8881067b7da0 EFLAGS: 00010286

RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff811c72ac

RDX: ffff8881026a2140 RSI: ffffffff811c72b5 RDI: 0000000000000001

RBP: ffff8881067b7db0 R08: 0000000000000000 R09: 205b5d3730353139

R10: 0000000000000000 R11: 205d303938375420 R12: ffff8881086500c4

R13: ffff888108

Remediation

Check the references section for vendor advisories and patches from linux. Update linux_kernel to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status
linux linux_kernel >= 5.2, < 5.4.279 Affected

Frequently Asked Questions

What is CVE-2024-40958?

CVE-2024-40958 is a high-severity vulnerability affecting linux linux_kernel. It was published on July 12, 2024 and has a CVSS 3.1 base score of 7.8 (HIGH).

How severe is CVE-2024-40958?

This vulnerability has a CVSS 3.1 base score of 7.8, rated HIGH. It requires local or adjacent network access to exploit. Some level of privileges is required for exploitation.

How do I fix or remediate CVE-2024-40958?

Check the references section for vendor advisories and patches from linux. Update linux_kernel to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2024-40958?

CyberStrike's AI-powered security agents can automatically detect CVE-2024-40958 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.