# CVE-2024-38592: drm/mediatek: Init \`ddp\_comp\` with devm\_kcalloc()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.33% (percentile 18, 2026-11-28)
- **CWE:** CWE-908
- **Published:** 2024-06-19T13:45:43.367Z
- **Modified:** 2026-08-05T11:33:03.299Z

## Who should check

- Anyone running Linux \>= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, \< cf69d0af7db917b82aceaa44b7b1b9376609da22; \>= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, \< 9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1; \>= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, \< 01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33
- Anyone running Linux 6.7

## 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 and fixed versions

- Linux: \>= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, \< cf69d0af7db917b82aceaa44b7b1b9376609da22; \>= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, \< 9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1; \>= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, \< 01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33 (cvelist)
- Linux: 6.7 (cvelist)

## Mitigation

- Upgrade Linux to 01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-38592. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-38592.md
Affected: Linux >= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, < cf69d0af7db917b82aceaa44b7b1b9376609da22; >= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, < 9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1; >= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, < 01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33; Linux 6.7
Fixed in: Linux 9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1, Linux 01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-38592 being exploited?

There is no confirmed exploitation: CVE-2024-38592 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2024-38592?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-38592?

Linux \>= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, \< cf69d0af7db917b82aceaa44b7b1b9376609da22; \>= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, \< 9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1; \>= 01389b324c97ff8f04e9c33b9ee246084f9f6dd2, \< 01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33; Linux 6.7.

### Is there a fix for CVE-2024-38592?

Yes. Fixed in Linux 9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1, Linux 01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33. Upgrade Linux to 01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33 or later.

### How do I check if I'm affected by CVE-2024-38592?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/cf69d0af7db917b82aceaa44b7b1b9376609da22>
- patch: <https://git.kernel.org/stable/c/9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1>
- patch: <https://git.kernel.org/stable/c/01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-38592>

HTML: <https://flawdb.com/CVE-2024-38592> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-38592>
