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

High 7.1 Published Updated

A null pointer dereference in the AMD GPU driver can cause a kernel crash, leading to denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2024-26672?

CVE-2024-26672 is a high-severity vulnerability in Linux kernel, published on 2 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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!

Weakness: CWE-476

Which versions are affected by CVE-2024-26672?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-26672?

Apply the vendor's patch.

Is CVE-2024-26672 being exploited?

There is no known exploitation of CVE-2024-26672 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as AZL-59613, AZL-59684, BELL-CVE-2024-26672, DEBIAN-CVE-2024-26672, GHSA-r32p-gh6m-33hq, ROOT-OS-DEBIAN-11-CVE-2024-26672 and 3 more.

Is CVE-2024-26672 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free