CVE-2024-38592
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
19/06/2024
Last modified:
17/09/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
drm/mediatek: Init `ddp_comp` with devm_kcalloc()<br />
<br />
In the case where `conn_routes` is true we allocate an extra slot in<br />
the `ddp_comp` array but mtk_drm_crtc_create() never seemed to<br />
initialize it in the test case I ran. For me, this caused a later<br />
crash when we looped through the array in mtk_drm_crtc_mode_valid().<br />
This showed up for me when I booted with `slub_debug=FZPUA` which<br />
poisons the memory initially. Without `slub_debug` I couldn&#39;t<br />
reproduce, presumably because the later code handles the value being<br />
NULL and in most cases (not guaranteed in all cases) the memory the<br />
allocator returned started out as 0.<br />
<br />
It really doesn&#39;t hurt to initialize the array with devm_kcalloc()<br />
since the array is small and the overhead of initting a handful of<br />
elements to 0 is small. In general initting memory to zero is a safer<br />
practice and usually it&#39;s suggested to only use the non-initting alloc<br />
functions if you really need to.<br />
<br />
Let&#39;s switch the function to use an allocation function that zeros the<br />
memory. For me, this avoids the crash.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.8.12 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.9 (including) | 6.9.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33
- https://git.kernel.org/stable/c/9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1
- https://git.kernel.org/stable/c/cf69d0af7db917b82aceaa44b7b1b9376609da22
- https://git.kernel.org/stable/c/01a2c5123e27b3c4685bf2fc4c2e879f6e0c7b33
- https://git.kernel.org/stable/c/9fe2cc3fa44f7ad7ba5f29c1a68b2b924c17b9b1
- https://git.kernel.org/stable/c/cf69d0af7db917b82aceaa44b7b1b9376609da22



