# CVE-2024-26672: drm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()'

- Severity: High 7.1 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 12% of CVEs (2026-12-01)
- Published: 2024-04-02T06:49:14.653Z
- Modified: 2026-06-17T07:18:03.597Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

drm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()'

Fixes the below:

drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c:377 amdgpu_mca_smu_get_mca_entry() warn: variable dereferenced before check 'mca_funcs' (see line 368)

357 int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev,
				     enum amdgpu_mca_error_type type,
358                                  int idx, struct mca_bank_entry *entry)
359 {
360         const struct amdgpu_mca_smu_funcs *mca_funcs =
						adev->mca.mca_funcs;
361         int count;
362
363         switch (type) {
364         case AMDGPU_MCA_ERROR_TYPE_UE:
365                 count = mca_funcs->max_ue_count;

mca_funcs is dereferenced here.

366                 break;
367         case AMDGPU_MCA_ERROR_TYPE_CE:
368                 count = mca_funcs->max_ce_count;

mca_funcs is dereferenced here.

369                 break;
370         default:
371                 return -EINVAL;
372         }
373
374         if (idx >= count)
375                 return -EINVAL;
376
377         if (mca_funcs && mca_funcs->mca_get_mca_entry)
	        ^^^^^^^^^

Checked too late!

(As written by CVE List.)

## Affected

- Linux Linux: from d38ceaf99ed015f2a0b9af3499791bd3a3daae21 before 7b5d58c07024516c0e81b95e98f37710cf402c53; from d38ceaf99ed015f2a0b9af3499791bd3a3daae21 before 4f32504a2f85a7b40fe149436881381f48e9c0c0; 4.2 (not affected: before 4.2; from 6.7.4 up to 6.7.*; from 6.8 up to *)
- linux linux_kernel: before 6.7.4

## References

- <https://git.kernel.org/stable/c/7b5d58c07024516c0e81b95e98f37710cf402c53> (patch)
- <https://git.kernel.org/stable/c/4f32504a2f85a7b40fe149436881381f48e9c0c0> (patch)

## Sources

- CVE List: [CVE-2024-26672](https://www.cve.org/CVERecord?id=CVE-2024-26672), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-26672](https://nvd.nist.gov/vuln/detail/CVE-2024-26672), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-26672 · Whole record: https://cve.day/CVE-2024-26672.json · Rebuilt by cve.day 2026-11-25T22:58:38.368Z
