Skip to main content

Linux Kernel CVE-2024-38541

HIGH
Classic Buffer Overflow (CWE-120)
2024-06-19 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.8
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
    Obtain local low-privilege shell
  2. Delivery
    Trigger device tree modalias lookup with oversized compatible string
  3. Exploit
    of_modalias() len wraps negative, str pointer escapes buffer
  4. Execution
    Out-of-bounds kernel memory write
  5. Persist
    Corrupt kernel control structures
  6. Impact
    Escalate privileges to root

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Buffer copy size validation
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a local user account with at least low-privilege access (PR:L per CVSS). The vulnerable code path is in of_modalias(), which is invoked during Open Firmware / device tree-based module alias resolution - this code path is only active on kernels compiled with OF/device tree support (CONFIG_OF), which is standard on ARM, ARM64, PowerPC, RISC-V, and similar embedded/SoC architectures, but not the default code path on standard x86 bare-metal servers without device tree. An attacker must be able to trigger a modalias lookup against a device tree node whose compatible property string is long enough that even the first snprintf() into the caller-supplied buffer overflows it. Exploitation is further limited by the requirement for physical or remote shell access to the target system, and by kernel hardening features such as SMEP, SMAP, and stack canaries which raise the bar for converting a kernel heap/stack corruption into reliable code execution.

Impact

The CVSS 3.1 vector AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H yields a base score of 7.8 and reflects realistic exploitation conditions: local access with minimal privilege is sufficient, no user interaction is needed, and successful exploitation yields full kernel-level C/I/A impact. EPSS sits at 1.48% (71st percentile), meaning this CVE ranks in the upper third of all CVEs by exploitation probability but the absolute probability remains low, consistent with a kernel-internal code path that is not easily reachable from unprivileged userspace in typical configurations. The vulnerability is NOT in CISA KEV and no public exploit code has been identified, which meaningfully reduces near-term operational risk. The attack complexity (AC:L) may be slightly optimistic given that triggering the overflow requires either crafted device tree content or a kernel caller supplying an undersized buffer - conditions more common in embedded/IoT or hypervisor contexts than in standard server deployments. For general-purpose Linux servers running hardened distributions with SELinux/AppArmor and limited local user access, real-world exploitability is lower than the CVSS score suggests. Embedded and IoT systems using device tree hardware description (ARM, RISC-V, PowerPC platforms) carry higher practical risk because device tree content may be attacker-influenced.

Exploit ScenarioDerived

An attacker with a local low-privileged shell account on a Linux system using device tree hardware description (ARM, PowerPC, or RISC-V platform) triggers the of_modalias() function by initiating a module lookup against a device tree node whose compatible string is long enough to overflow a small caller-supplied buffer. The negative len value causes the str pointer to reference memory beyond the buffer, and subsequent snprintf() writes corrupt adjacent kernel heap or stack memory. With sufficient control over the overflow content, the attacker could overwrite kernel function pointers or security structures to escalate privileges to root. No public proof-of-concept has been identified at time of analysis.

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

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

Alert me

AnalysisAIv3 – Aug 04, 2026

Buffer overflow in the Linux kernel's of_modalias() function allows a local low-privileged attacker to potentially corrupt kernel memory, leading to privilege escalation or system crash. The flaw exists in the Open Firmware (OF) module subsystem: when the output buffer is undersized relative to the first snprintf() call, the len variable wraps to a negative value and the str pointer advances past the buffer boundary, enabling out-of-bounds writes in subsequent operations. No public exploit has been identified at time of analysis, though the CVSS score of 7.8 with local C:H/I:H/A:H impact signals serious post-exploitation potential on affected kernels.

Earlier versions of this analysis (2)
v2 Aug 04, 2026 - 12:02 cvss changed CVSS 7.8

Buffer overflow in the Linux kernel's of_modalias() function (drivers/of/module.c) allows a local attacker with low privileges to write past an allocated kernel buffer boundary on Device Tree-enabled platforms. When of_modalias() is called with an undersized output buffer, the len variable goes negative after the first snprintf() returns a value exceeding the buffer size, causing the str pointer to advance beyond the buffer's end - enabling out-of-bounds kernel memory writes with potential for privilege escalation. No public exploit code or CISA KEV active-exploitation listing exists at time of analysis; EPSS sits at 1.48% (71st percentile), suggesting elevated but not immediate exploitation probability.

v1 Aug 04, 2026 - 12:01 cvss changed CVSS 7.8

Buffer overflow in the Linux kernel's device tree module alias function of_modalias() allows a local low-privileged user to corrupt kernel memory, potentially achieving privilege escalation or arbitrary code execution. The flaw exists because when the output buffer is too small for the first snprintf() call, the remaining length variable len wraps to a negative value and the write pointer str advances past the buffer's end, enabling out-of-bounds kernel memory writes. No public exploit or CISA KEV listing has been identified at time of analysis, though the 71st-percentile EPSS ranking indicates elevated concern relative to most CVEs.

RemediationAI

Apply the vendor-released kernel patches available across multiple stable branches via the upstream stable tree; the primary patch references are https://git.kernel.org/stable/c/0b0d5701a8bf02f8fee037e81aacf6746558bfd6 and https://git.kernel.org/stable/c/cf7385cb26ac4f0ee6c7385960525ad534323252 among others. Debian LTS users should apply the updates announced at https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html. Exact fixed kernel release versions per stable branch are not confirmed from available data - verify against the upstream stable release tags tied to the listed commits before deploying. As a compensating control where patching is not immediately feasible, restricting local user accounts (minimizing PR:L attack surface) and enforcing mandatory access control policies (SELinux enforcing, AppArmor profiles) reduces the likelihood of exploitation by limiting which processes can trigger the of_modalias() code path. On systems where device tree-based hardware is not used (x86 bare metal without OF support), the code path may be unreachable, though this should be verified per kernel config. There are no known side effects from applying the patch.

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 vulnerability resides in of_modalias() within the Linux kernel's drivers/of/module.c, which constructs modalias strings from Open Firmware device tree nodes for automatic kernel module loading. The root cause is CWE-120 (Classic Buffer Copy without Checking Size of Input), specifically a missing bounds check after the first snprintf() invocation: if the formatted string already exceeds the buffer length, len becomes negative (signed integer underflow of the remaining-capacity variable) and the str pointer, if non-NULL, is advanced beyond the allocated buffer end. Any subsequent snprintf() or strlen() call on that corrupted pointer operates on out-of-bounds kernel memory. The fix adds an explicit overflow guard after the first snprintf() and corrects the post-strlen() check to account for the NUL terminator. Affected products span multiple Linux kernel stable branches per seven CPE entries (cpe:2.3:o:linux:linux_kernel:*) and eight distinct stable-tree patch commits, indicating broad version coverage across the 5.x and 6.x series.

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.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Local access and low privilege required to trigger OF modalias path; kernel memory corruption yields full C/I/A impact with no scope change.

3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/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
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

6
Analysis Updated
Aug 04, 2026 - 12:08 vuln.today
v3 - CVSS changed
Analysis Updated
Aug 04, 2026 - 12:02 vuln.today
v2 - CVSS changed
Analysis Updated
Aug 04, 2026 - 12:01 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.8 (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:

of: module: add buffer overflow check in of_modalias()

In of_modalias(), if the buffer happens to be too small even for the 1st snprintf() call, the len parameter will become negative and str parameter (if not NULL initially) will point beyond the buffer's end. Add the buffer overflow check after the 1st snprintf() call and fix such check after the strlen() call (accounting for the terminating NUL char).

Executive ViewAI

Why It Matters

CVE-2024-38541 is a buffer overflow in the Linux kernel's Open Firmware module that allows local low-privileged attackers to escalate privileges or crash systems. Any organization running vulnerable Linux kernels faces risk of unauthorized administrative access and service disruption; immediate patching is required to prevent privilege escalation attacks from compromise of any local user account.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
1.5%
Top 29% exploitable
Prevalence
Ubiquitous
Linux kernel underpins virtually all servers, containers, and Android devices
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 1.5%
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

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

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:*:*:*:*:*:*:*:*

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