Linux Kernel
CVE-2024-38612
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local low-privilege access
-
DeliveryConfirm kernel built with CONFIG_IPV6_SEG6_HMAC but without CONFIG_IPV6_SEG6_LWTUNNEL
-
ExploitTrigger seg6_hmac_init() failure via resource pressure
-
Executionseg6_init() error path skips genl_unregister_family()
-
PersistSend crafted netlink messages to dangling family structure
-
ImpactExploit use-after-free for kernel privilege escalation
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires all of the following simultaneous conditions: (1) the target kernel is compiled WITHOUT the CONFIG_IPV6_SEG6_LWTUNNEL option - kernels compiled with this option follow a different initialization code path that is not affected; (2) the kernel IS compiled with CONFIG_IPV6_SEG6_HMAC so that seg6_hmac_init() is called during seg6_init(); (3) seg6_hmac_init() fails at runtime, triggering the defective error unwind that skips genl_unregister_family(); and (4) the attacker has local shell access with at least low-privilege credentials (PR:L per CVSS vector) to interact with the resulting corrupted kernel state. The condition limiting exploitation most severely is the unusual build configuration - most production and distribution kernels either include full SEG6 lwtunnel support or omit the HMAC subsystem entirely, making the vulnerable combination relatively rare. Remote exploitation is not possible (AV:L). No user interaction is required once conditions are met. |
| Impact | The NVD-assigned CVSS 3.1 score of 7.0 (AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H) correctly reflects a local, high-complexity attack scenario with high impact potential. Real-world risk is materially lower than the raw score suggests for most environments: exploitation requires three simultaneous conditions - (1) the kernel is compiled without CONFIG_IPV6_SEG6_LWTUNNEL, (2) seg6_hmac_init() must fail at runtime, and (3) the attacker has local access with at least low privileges. The EPSS score of 0.17% at the 37th percentile corroborates limited attacker interest or known exploitation technique. The vulnerability is not listed in the CISA KEV catalog and no public proof-of-concept has been identified. The high C/I/A impact metrics are plausible for a kernel use-after-free but represent a ceiling, not a guaranteed outcome - actual exploitability depends heavily on kernel ASLR, SMEP/SMAP mitigations, and whether the freed genl family structure is reachable in a timing-sensitive manner. Overall assessment: low operational priority for environments with standard hardened kernel configurations and no untrusted local users; elevated priority on systems with untrusted local access and minimalist kernel builds that omit the lwtunnel option. |
| Exploit ScenarioDerived | A local attacker with a standard shell account on a Linux system built without CONFIG_IPV6_SEG6_LWTUNNEL could attempt to force a seg6_hmac_init() failure - for example through resource exhaustion or namespace manipulation - during kernel module initialization, causing the seg6 generic netlink family to enter a partially freed state. The attacker then sends crafted generic netlink messages targeting the freed family structure, potentially redirecting kernel execution flow via the corrupted function pointer table to achieve privilege escalation to root. No public exploit code for this specific scenario is known at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Aug 04, 2026
Use-after-free exposure in the Linux kernel's IPv6 Segment Routing (SR) subsystem arises from a defective error path in seg6_init() that omits a required genl_unregister_family() call when CONFIG_IPV6_SEG6_LWTUNNEL is not compiled in and seg6_hmac_init() subsequently fails, leaving a dangling kernel generic netlink family registration. A local attacker with low privileges on a specifically configured kernel build could leverage the resulting CWE-416 memory corruption to trigger kernel instability or potentially escalate privileges to ring-0. No public exploit code has been identified at time of analysis, and EPSS probability stands at a low 0.17%, indicating limited observed exploitation interest.
Earlier versions of this analysis (1)
Use-after-free in the Linux kernel's IPv6 Segment Routing (SR) subsystem allows a local low-privileged attacker to exploit an incorrect error path in seg6_init(), potentially achieving memory corruption with high confidentiality, integrity, and availability impact. The defect exists specifically when the kernel is built without CONFIG_IPV6_SEG6_LWTUNNEL and seg6_hmac_init() fails during initialization, causing genl_unregister_family() to be skipped and leaving a dangling registered generic netlink family. No public exploit has been identified and EPSS sits at 0.17% (37th percentile), indicating low near-term exploitation probability; upstream stable patches are available across multiple kernel branches.
RemediationAI
The primary fix is to apply the upstream stable kernel patches provided across nine stable-tree commits, the first of which is available at https://git.kernel.org/stable/c/00e6335329f23ac6cf3105931691674e28bc598c; additional stable-branch backports are at the sibling commit URLs listed in the NVD references. Distribution users should update to the patched kernel version provided by their Linux vendor (RHEL, Ubuntu, SUSE, Debian, etc.) once downstream packages incorporating these stable commits are released. For systems where immediate kernel upgrade is not feasible, the most effective compensating control is ensuring IPv6 Segment Routing HMAC support (CONFIG_IPV6_SEG6_HMAC) is also absent from the build, as the dangerous code path is only triggered when seg6_hmac_init() is called and fails - eliminating HMAC support removes the failure trigger. Additionally, restricting local user access via namespace isolation (disabling unprivileged user namespaces with sysctl kernel.unprivileged_userns_clone=0) reduces the pool of potential local exploiters, though it does not eliminate the underlying bug. Patch availability is confirmed by vendor (kernel.org stable tree); exact patched release version per distribution should be verified against the distribution's security advisories.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected subsystem is the Linux kernel's IPv6 Segment Routing implementation (net/ipv6/seg6.c), specifically the module initialization function seg6_init(). The bug originates from conditional compilation: when CONFIG_IPV6_SEG6_LWTUNNEL is undefined, the code takes an alternate error-handling branch that skips a call to genl_unregister_family(), meaning the generic netlink family registered earlier in initialization is never cleaned up on failure. This violates kernel resource ownership invariants and introduces a CWE-416 (Use After Free) condition - the freed or partially initialized genl family structure may be dereferenced by later netlink operations. The root cause traces to commit 46738b1317e1 introducing the conditional lwtunnel path, compounded by commit 5559cea2d5aa which replaced unregister_pernet_subsys() with genl_unregister_family() in the error unwind without correctly guarding it under the same CONFIG flag. The affected CPE is cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*, spanning multiple stable branches as evidenced by nine separate stable-tree patch commits.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Local vector and high complexity confirmed by dual build-config prerequisite; low privileges and high impact appropriate for kernel use-after-free with privilege escalation potential.
Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).
CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Lifecycle Timeline
5DescriptionCVE.org
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.
Executive ViewAI
A use-after-free vulnerability in the Linux kernel's IPv6 Segment Routing subsystem (CVE-2024-38612, CVSS 7.0) allows local users with low system privileges to trigger kernel memory corruption and potentially escalate to root-level access on affected systems. The vulnerability affects only systems with specific kernel compile-time configurations, but patch availability enables prompt remediation across the infrastructure. Organizations should prioritize identification and patching of affected Linux systems to prevent unauthorized privilege escalation.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB