tcp: Use refcount_inc_not_zero() in tcp_twsk_unique().
CVE-2024-36904

7.8HIGH

Key Information:

Vendor

Linux

Status
Vendor
CVE Published:
30 May 2024

Badges

๐Ÿ“ˆ Score: 665๐Ÿ‘พ Exploit Exists๐Ÿ“ฐ News Worthy

Key facts: CVE-2024-36904 is a high severity (CVSS 7.8) vulnerability in Linux. It is known to be exploited in the wild. Its EPSS score is 0.6%, the estimated probability of exploitation in the next 30 days. Fixed in Linux 84546cc1aeeb4df3e444b18a4293c9823f974be9, 1796ca9c6f5bd50554214053af5f47d112818ee3, 1d9cf07810c30ef7948879567d10fd1f01121d34, 27b0284d8be182a81feb65581ab6a724dfd596e8.

What is CVE-2024-36904?

CVE-2024-36904 is a significant vulnerability found in the Linux kernel, specifically affecting TCP socket handling. This vulnerability arises from a use-after-free condition in the function that manages unique TCP time-wait sockets. If exploited, it could allow an attacker to manipulate socket references in a way that might compromise system stability and integrity. As the Linux kernel forms the backbone of various operating systems and cloud infrastructures, this vulnerability poses a critical risk to organizations relying on Linux-based systems.

Technical Details

The vulnerability originates in the tcp_twsk_unique() function where a race condition can occur due to improper reference counting of TCP time-wait sockets. When the socket management process sets the socket reference count after its inclusion in a hash table, it creates a small window of opportunity for other threads. These threads could initiate a connection and call sock_hold() for the time-wait socket with a zero reference count. As a result, this improper reference handling can lead to an underflow when sock_put() is subsequently called, manifesting as a use-after-free error elsewhere in the system.

Potential Impact of CVE-2024-36904

  1. System Instability: Exploiting this vulnerability could lead to random crashes or instability in network applications or even the kernel itself, significantly disrupting services.

  2. Remote Code Execution: Attackers could potentially leverage this vulnerability to execute arbitrary code in the context of a vulnerable system, allowing extensive control over networked systems.

  3. Increased Attack Surface: This vulnerability may facilitate further exploitation techniques, allowing attackers to escalate privileges or gain unauthorized access to sensitive data or network configurations.

Affected Version(s)

Linux ec94c2696f0bcd5ae92a553244e4ac30d2171a2d < 84546cc1aeeb4df3e444b18a4293c9823f974be9

Linux ec94c2696f0bcd5ae92a553244e4ac30d2171a2d < 1796ca9c6f5bd50554214053af5f47d112818ee3

Linux ec94c2696f0bcd5ae92a553244e4ac30d2171a2d < 1d9cf07810c30ef7948879567d10fd1f01121d34

News Articles

PoC Exploit Released for Use-after-free Linux Kernel Vulnerability

Security researchers have publicly released a proof-of-concept (PoC) exploit for CVE-2024-36904, a critical use-after-free vulnerability.

PoC Exploit Released for Linux Kernel Use-After-Free Vulnerability

A proof-of-concept (PoC) exploit has been released for a use-after-free vulnerability in the Linux kernel, identified as CVE-2024-36904.

Seven Years Old Linux Kernel Vulnerability Let Attackers Execute Remote Code

Researchers have uncovered a critical flaw in the Linux kernel that could allow attackers to execute remote code.ย 

References

  • CVE-2026-99676: Linux Kernel Vulnerability in Refcount Management and Lockless Socket Access(CRITICAL)
  • CVE-2026-99582: Linux Kernel Vulnerability in SCTP Control Chunk Migration(HIGH)
  • CVE-2026-99370: Buffer Overflow Vulnerability in Linux Kernel NFSD Product by Linux Foundation(CRITICAL)
  • CVE-2026-99362: Buffer Overflow Vulnerability in Linux Kernel NFS(CRITICAL)
  • CVE-2026-99312: Memory Management Unit Vulnerability in Linux Kernel Affecting KVM(HIGH)
  • CVE-2026-99304: Integer Overflow Vulnerability in Ceph Component of Linux Kernel(CRITICAL)
  • CVE-2026-99288: Memory Reuse Vulnerability in Linux Kernel TCP Established Lookups(HIGH)
  • CVE-2026-99270: Memory Management Issues in Linux Kernel TCP Socket Migration(HIGH)
Browse all analysed vulnerabilities โ€บ

CVSS V3.1

Score:
7.8
Severity:
HIGH
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Local
Attack Complexity:
Low
Privileges Required:
Low
User Interaction:
None
Scope:
Unchanged

Timeline

  • ๐Ÿ‘พ

    Exploit known to exist

  • ๐Ÿ“ฐ

    First article discovered by CybersecurityNews

  • Vulnerability published

  • Vulnerability Reserved

.