Skip to main content

Linux Kernel CVE-2024-38612

HIGH
Use After Free (CWE-416)
2024-06-19 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.0
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain local low-privilege access
  2. Delivery
    Confirm kernel built with CONFIG_IPV6_SEG6_HMAC but without CONFIG_IPV6_SEG6_LWTUNNEL
  3. Exploit
    Trigger seg6_hmac_init() failure via resource pressure
  4. Execution
    seg6_init() error path skips genl_unregister_family()
  5. Persist
    Send crafted netlink messages to dangling family structure
  6. Impact
    Exploit 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – 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)
v1 Aug 04, 2026 - 11:52 cvss changed CVSS 7.0

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

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY 7.0 HIGH
AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.0 HIGH

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.

3.1 AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

5
Analysis Updated
Aug 04, 2026 - 11:59 vuln.today
v2 - CVSS changed
Analysis Updated
Aug 04, 2026 - 11:52 vuln.today
v1 - CVSS changed
Severity Changed
Aug 04, 2026 - 11:23 NVD
CRITICAL HIGH
CVSS changed
Aug 04, 2026 - 11:23 NVD
9.8 (CRITICAL) 7.0 (HIGH)
CVE Published
Jun 19, 2024 - 14:15 cve.org
CRITICAL 9.8

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 63% exploitable
Prevalence
Ubiquitous
Linux kernel runs the majority of server, cloud, and embedded production systems globally
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

35
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +35
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

Affected Products (CPE)CVE.org

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy