CVE-2024-38541

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

HIGH
7.8
CVSS Score
Published: June 19, 2024 at 01:35 PM UTC
Updated: August 5, 2026 at 12:04 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.9%
SSVC
No known exploit

Description

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

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.14 ≤ v < 5.10.2384.14 ≤ v < 5.15.1824.14 ≤ v < 5.4.2944.14 ≤ v < 6.1.1364.14 ≤ v < 6.104.14 ≤ v < 6.6.334.14 ≤ v < 6.8.124.14 ≤ v < 6.9.35.11 ≤ v < 5.15.1825.16 ≤ v < 6.1.1365.5 ≤ v < 5.10.2386.2 ≤ v < 6.6.336.7 ≤ v < 6.8.126.9 ≤ v < 6.9.34.14bc575064d688bc575064d688c8933a6ca51429bea9bc63628d3b
Vendor states this is fixed in 0b0d5701a8bf (fixed)
Vendor states this is fixed in 0b0d5701a8bf02f8fee037e81aacf6746558bfd6 (fixed)
Vendor states this is fixed in 46795440ef2b4ac919d09310a69a404c5bc90a88 (fixed)
Vendor states this is fixed in 5d59fd637a8af42b211a92b2edb2474325b4d488 (fixed)
Vendor states this is fixed in 733e62786bdf1b2b9dbb09ba2246313306503414 (fixed)
Vendor states this is fixed in c7f24b7d94549ff4623e8f41ea4d9f5319bd8ac8 (fixed)
Vendor states this is fixed in cf7385cb26ac (fixed)
Vendor states this is fixed in cf7385cb26ac4f0ee6c7385960525ad534323252 (fixed)
Vendor states this is fixed in e45b69360a63 (fixed)
Vendor states this is fixed in e45b69360a63165377b30db4a1dfddd89ca18e9a (fixed)
Vendor states this is fixed in ee332023adfd (fixed)
Vendor states this is fixed in ee332023adfd5882808f2dabf037b32d6ce36f9e (fixed)
Vendor states this is fixed in 4.14 (unaffected)
Vendor states this is fixed in 5.10.238 (unaffected)
Vendor states this is fixed in 5.15.182 (unaffected)
Vendor states this is fixed in 5.4.294 (unaffected)
Vendor states this is fixed in 6.1.136 (unaffected)
Vendor states this is fixed in 6.10 (unaffected)
Vendor states this is fixed in 6.10-rc1 (unaffected)
Vendor states this is fixed in 6.6.33 (unaffected)
Vendor states this is fixed in 6.8.12 (unaffected)
Vendor states this is fixed in 6.9.3 (unaffected)

References (10)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/0b0d5701a8bf02f8fee037e81aacf6746558bfd6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/46795440ef2b4ac919d09310a69a404c5bc90a88
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5d59fd637a8af42b211a92b2edb2474325b4d488
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/733e62786bdf1b2b9dbb09ba2246313306503414
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c7f24b7d94549ff4623e8f41ea4d9f5319bd8ac8
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/cf7385cb26ac4f0ee6c7385960525ad534323252
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e45b69360a63165377b30db4a1dfddd89ca18e9a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ee332023adfd5882808f2dabf037b32d6ce36f9e

SSVC — Action Prioritization

SSVCNo known exploitAutomatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-120

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card