Skip to main content

CVE-2024-38612: Vulnerability in Linux Linux

Critical
VulnerabilityCVE-2024-38612cvecve-2024-38612
Published: Wed Jun 19 2024 (06/19/2024, 13:56:13 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ipv6: sr: fix invalid unregister error path The error path of seg6_init() is wrong in case CONFIG_IPV6_SEG6_LWTUNNEL is not defined. In that case if seg6_hmac_init() fails, the genl_unregister_family() isn't called. This issue exist since commit 46738b1317e1 ("ipv6: sr: add option to control lwtunnel support"), and commit 5559cea2d5aa ("ipv6: sr: fix possible use-after-free and null-ptr-deref") replaced unregister_pernet_subsys() with genl_unregister_family() in this error path.

AI-Powered Analysis

AILast updated: 07/03/2025, 00:56:26 UTC

Technical Analysis

CVE-2024-38612 is a critical vulnerability in the Linux kernel related to the IPv6 Segment Routing (SR) implementation, specifically within the segment routing lightweight tunnel (seg6_lwtunnel) code path. The issue arises from an incorrect error handling path in the seg6_init() function when the kernel is compiled without the CONFIG_IPV6_SEG6_LWTUNNEL option enabled. In this scenario, if the seg6_hmac_init() function fails during initialization, the cleanup function genl_unregister_family() is not called properly. This leads to resource mismanagement, which can cause use-after-free and null pointer dereference conditions, as indicated by the associated CWEs (CWE-416 and CWE-476). These memory corruption issues can be exploited remotely without authentication or user interaction, as the vulnerability is network-exposed (AV:N) and requires no privileges (PR:N). The CVSS v3.1 score of 9.8 reflects the critical severity, with high impact on confidentiality, integrity, and availability. Exploitation could allow an attacker to execute arbitrary code, cause kernel crashes (denial of service), or escalate privileges, severely compromising affected systems. The vulnerability has existed since commit 46738b1317e1 and was introduced when the seg6_lwtunnel support option was added. The fix involves correcting the error path to ensure proper cleanup is performed on failure, preventing use-after-free and null pointer dereference conditions. No known exploits are reported in the wild yet, but the critical nature and ease of exploitation make timely patching essential.

Potential Impact

For European organizations, the impact of CVE-2024-38612 is significant due to the widespread use of Linux in servers, cloud infrastructure, and network devices. Exploitation could lead to full system compromise, data breaches, service outages, and disruption of critical services. Organizations relying on IPv6 networking and segment routing features are particularly at risk. The vulnerability could be leveraged by attackers to gain unauthorized access, disrupt business operations, or pivot within networks. Given the criticality and remote exploitability, this vulnerability poses a high risk to sectors such as finance, telecommunications, government, and critical infrastructure in Europe. The potential for denial of service or privilege escalation could also impact compliance with EU data protection regulations (e.g., GDPR) due to possible data exposure or service unavailability.

Mitigation Recommendations

European organizations should prioritize applying the official Linux kernel patches that address this vulnerability as soon as they become available. In the interim, disabling IPv6 segment routing features (CONFIG_IPV6_SEG6_LWTUNNEL) if not required can reduce exposure. Network administrators should monitor network traffic for unusual IPv6 segment routing activity and implement strict network segmentation and firewall rules to limit exposure to untrusted networks. Employing kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR) and Control Flow Integrity (CFI) can mitigate exploitation impact. Regularly updating Linux distributions and subscribing to vendor security advisories ensures timely awareness of patches. Additionally, organizations should conduct vulnerability scanning and penetration testing focused on IPv6 and segment routing features to detect potential exploitation attempts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-06-18T19:36:34.944Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9829c4522896dcbe2b1e

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

Last enriched: 7/3/2025, 12:56:26 AM

Last updated: 8/13/2025, 8:53:10 PM

Views: 17

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