CVE-2024-38541: of: module: add buffer overflow check in of_modalias()
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).
Security readout for executives and security teams
Plain-English summary
A Linux kernel function can mishandle an output buffer that is too small, allowing a pointer to move beyond the buffer boundary. The supplied record assigns CVSS 9.8, implying potentially severe confidentiality, integrity, and availability impact. However, the bundle does not demonstrate a practical remote attack path or exploitation.
Executive priority
Assign urgent vulnerability-management review because the potential impact is critical, but prioritize deployment using confirmed kernel exposure and workload reachability. Do not interpret the 9.8 score as proof of widespread remote exploitability. Apply supported vendor updates promptly once applicability is verified.
Technical view
In of_modalias(), an undersized buffer can make the length negative after the first snprintf() and advance a non-null pointer beyond the buffer. The correction adds an immediate overflow check and accounts for the terminating NUL in a later check. The issue is classified as CWE-120.
Likely exposure
Potential exposure exists on systems running kernel versions identified by the supplied affected records where device-tree module alias generation reaches the vulnerable buffer condition. The version entries do not clearly define all range boundaries, so kernel and distribution advisories should determine actual exposure. Internet reachability is not established.
Exploitation context
CVE-2024-38541 is not identified as KEV in the supplied bundle, and no supplied source reports active exploitation. Although the provided CVSS vector describes an unauthenticated network attack, the materials do not explain how network-controlled input reaches of_modalias(). Treat exploitability and remote reachability as unconfirmed.
Researcher notes
The source bundle provides multiple stable-branch fixes but an ambiguous affected-version list, including an unexplained “0” entry and repeated commit identifiers. Researchers should map each running kernel to its relevant stable or distribution branch. The supplied evidence establishes the boundary-check defect and correction, but not attacker-controlled reachability, exploitation reliability, or observed attacks.
Mitigation direction
Inventory running Linux kernels and compare them with vendor-supported affected-version guidance.
Apply the appropriate vendor kernel update containing the relevant stable fix.
Prioritize systems where device-tree module alias generation is operationally relevant.
Consult Linux distribution advisories where upstream version mapping remains ambiguous.
Validation and detection
Confirm the running kernel version and installed kernel package version on each system.
Verify the deployed kernel contains the applicable upstream stable correction.
After updating, confirm systems are running the intended patched kernel build.
Track vendor advisory status rather than relying solely on the ambiguous supplied version list.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-120: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
2CVSS vectors
3Timeline events
2ADP providers
11Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: total
CVSS vector scores
2 official scores
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-120 · source CWE mapping
Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')
Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.