CVE-2024-26672
Severity CVSS v4.0:
Pending analysis
Type:
CWE-476
NULL Pointer Dereference
Publication date:
02/04/2024
Last modified:
08/04/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
drm/amdgpu: Fix variable &#39;mca_funcs&#39; dereferenced before NULL check in &#39;amdgpu_mca_smu_get_mca_entry()&#39;<br />
<br />
Fixes the below:<br />
<br />
drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c:377 amdgpu_mca_smu_get_mca_entry() warn: variable dereferenced before check &#39;mca_funcs&#39; (see line 368)<br />
<br />
357 int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev,<br />
enum amdgpu_mca_error_type type,<br />
358 int idx, struct mca_bank_entry *entry)<br />
359 {<br />
360 const struct amdgpu_mca_smu_funcs *mca_funcs =<br />
adev->mca.mca_funcs;<br />
361 int count;<br />
362<br />
363 switch (type) {<br />
364 case AMDGPU_MCA_ERROR_TYPE_UE:<br />
365 count = mca_funcs->max_ue_count;<br />
<br />
mca_funcs is dereferenced here.<br />
<br />
366 break;<br />
367 case AMDGPU_MCA_ERROR_TYPE_CE:<br />
368 count = mca_funcs->max_ce_count;<br />
<br />
mca_funcs is dereferenced here.<br />
<br />
369 break;<br />
370 default:<br />
371 return -EINVAL;<br />
372 }<br />
373<br />
374 if (idx >= count)<br />
375 return -EINVAL;<br />
376<br />
377 if (mca_funcs && mca_funcs->mca_get_mca_entry)<br />
^^^^^^^^^<br />
<br />
Checked too late!
Impact
Base Score 3.x
7.10
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7.4 (excluding) |
To consult the complete list of CPE names with products and versions, see this page



