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-36904

7.8 · HIGH
Published May 30, 2024 linux CWE-416 EPSS 0.61% (47th pctl)

Overview

CVE-2024-36904 is a high-severity vulnerability affecting linux linux_kernel. It was published on May 30, 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:

tcp: Use refcount_inc_not_zero() in tcp_twsk_unique().

Anderson Nascimento reported a use-after-free splat in tcp_twsk_unique()

with nice analysis.

Since commit ec94c2696f0b ("tcp/dccp: avoid one atomic operation for

timewait hashdance"), inet_twsk_hashdance() sets TIME-WAIT socket's

sk_refcnt after putting it into ehash and releasing the bucket lock.

Thus, there is a small race window where other threads could try to

reuse the port during connect() and call sock_hold() in tcp_twsk_unique()

for the TIME-WAIT socket with zero refcnt.

If that happens, the refcnt taken by tcp_twsk_unique() is overwritten

and sock_put() will cause underflow, triggering a real use-after-free

somewhere else.

To avoid the use-after-free, we need to use refcount_inc_not_zero() in

tcp_twsk_unique() and give up on reusing the port if it returns false.

[0]:

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

WARNING: CPU: 0 PID: 1039313 at lib/refc

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 >= 4.16, < 4.19.314 Affected

Frequently Asked Questions

What is CVE-2024-36904?

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

How severe is CVE-2024-36904?

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-36904?

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-36904?

CyberStrike's AI-powered security agents can automatically detect CVE-2024-36904 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.