Skip to main content

CVE-2024-36971: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-36971cvecve-2024-36971
Published: Mon Jun 10 2024 (06/10/2024, 09:03:23 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: net: fix __dst_negative_advice() race __dst_negative_advice() does not enforce proper RCU rules when sk->dst_cache must be cleared, leading to possible UAF. RCU rules are that we must first clear sk->sk_dst_cache, then call dst_release(old_dst). Note that sk_dst_reset(sk) is implementing this protocol correctly, while __dst_negative_advice() uses the wrong order. Given that ip6_negative_advice() has special logic against RTF_CACHE, this means each of the three ->negative_advice() existing methods must perform the sk_dst_reset() themselves. Note the check against NULL dst is centralized in __dst_negative_advice(), there is no need to duplicate it in various callbacks. Many thanks to Clement Lecigne for tracking this issue. This old bug became visible after the blamed commit, using UDP sockets.

AI-Powered Analysis

AILast updated: 07/03/2025, 00:54:52 UTC

Technical Analysis

CVE-2024-36971 is a high-severity vulnerability in the Linux kernel related to improper handling of Reference Counted Update (RCU) rules within the network stack, specifically in the __dst_negative_advice() function. This function is responsible for managing the destination cache (sk->dst_cache) of socket structures. The vulnerability arises because __dst_negative_advice() does not correctly enforce the RCU protocol when clearing sk->dst_cache, leading to a use-after-free (UAF) condition. The correct protocol requires first clearing sk->sk_dst_cache and then calling dst_release() on the old destination cache object. However, __dst_negative_advice() performs these operations in the wrong order, violating RCU rules. This flaw became apparent after a recent commit and primarily affects UDP sockets. The consequence of this UAF is that an attacker with limited privileges (local access with low privileges) can exploit this race condition to potentially execute arbitrary code, cause denial of service, or escalate privileges by corrupting kernel memory. The vulnerability is classified under CWE-416 (Use After Free) and has a CVSS v3.1 score of 7.8, indicating high severity. No known exploits are currently reported in the wild, but the complexity and impact warrant prompt patching. The fix involves ensuring that each negative_advice() method correctly implements sk_dst_reset(), which adheres to the proper RCU protocol, preventing the UAF condition.

Potential Impact

For European organizations, this vulnerability poses a significant risk, especially for those relying on Linux-based infrastructure, including servers, network appliances, and embedded systems that handle UDP traffic. Exploitation could lead to kernel memory corruption, resulting in system crashes (denial of service), unauthorized privilege escalation, or arbitrary code execution at the kernel level. This could compromise confidentiality, integrity, and availability of critical systems. Given the widespread use of Linux in European public sector institutions, financial services, telecommunications, and cloud service providers, the impact could be broad and severe. Attackers exploiting this vulnerability could gain persistent access or disrupt essential services, affecting business continuity and data protection obligations under regulations like GDPR. The requirement for local low-privilege access limits remote exploitation but does not eliminate risk, as insider threats or compromised accounts could leverage this flaw.

Mitigation Recommendations

European organizations should prioritize applying the official Linux kernel patches that correct the RCU handling in __dst_negative_advice() and related negative_advice() methods. Since the vulnerability affects UDP sockets, network administrators should monitor and restrict unnecessary UDP services and isolate critical systems to reduce attack surface. Employ kernel live patching solutions where available to minimize downtime during patch deployment. Conduct thorough auditing of user privileges to limit local access to trusted personnel only. Implement enhanced monitoring for unusual kernel behavior or crashes that could indicate exploitation attempts. Additionally, organizations should review and update incident response plans to address potential kernel-level compromises. For environments where immediate patching is not feasible, consider deploying kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR) and Control Flow Integrity (CFI) to raise exploitation difficulty.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-30T15:25:07.082Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9829c4522896dcbe2840

Added to database: 5/21/2025, 9:08:57 AM

Last enriched: 7/3/2025, 12:54:52 AM

Last updated: 8/10/2025, 7:17:25 AM

Views: 16

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats