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 &amp;#39;mca_funcs&amp;#39; dereferenced before NULL check in &amp;#39;amdgpu_mca_smu_get_mca_entry()&amp;#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 &amp;#39;mca_funcs&amp;#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-&gt;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-&gt;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-&gt;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 &gt;= count)<br /> 375 return -EINVAL;<br /> 376<br /> 377 if (mca_funcs &amp;&amp; mca_funcs-&gt;mca_get_mca_entry)<br /> ^^^^^^^^^<br /> <br /> Checked too late!

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7.4 (excluding)