CVE-2024-38592

drm/mediatek: Init `ddp_comp` with devm_kcalloc()

MEDIUM
5.5
CVSS Score
Published: June 19, 2024 at 01:45 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
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: drm/mediatek: Init `ddp_comp` with devm_kcalloc() In the case where `conn_routes` is true we allocate an extra slot in the `ddp_comp` array but mtk_drm_crtc_create() never seemed to initialize it in the test case I ran. For me, this caused a later crash when we looped through the array in mtk_drm_crtc_mode_valid(). This showed up for me when I booted with `slub_debug=FZPUA` which poisons the memory initially. Without `slub_debug` I couldn't reproduce, presumably because the later code handles the value being NULL and in most cases (not guaranteed in all cases) the memory the allocator returned started out as 0. It really doesn't hurt to initialize the array with devm_kcalloc() since the array is small and the overhead of initting a handful of elements to 0 is small. In general initting memory to zero is a safer practice and usually it's suggested to only use the non-initting alloc functions if you really need to. Let's switch the function to use an allocation function that zeros the memory. For me, this avoids the crash.

Affected

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

6.7 ≤ v < 6.106.7 ≤ v < 6.8.126.7 ≤ v < 6.9.36.9 ≤ v < 6.9.31389b324c97ff8f4e9c33b9ee246084f9f6dd26.7
Vendor states this is fixed in 01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33 (fixed)
Vendor states this is fixed in 9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1 (fixed)
Vendor states this is fixed in cf69d0af7db917b82aceaa44b7b1b9376609da22 (fixed)
Vendor states this is fixed in 6.10 (unaffected)
Vendor states this is fixed in 6.7 (unaffected)
Vendor states this is fixed in 6.8.12 (unaffected)
Vendor states this is fixed in 6.9.3 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/cf69d0af7db917b82aceaa44b7b1b9376609da22

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

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

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-908

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