CVE-2024-27041 drm/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini()

Medium 5.5 Published Updated

A missing NULL check in the AMD display driver can cause a kernel crash during initialization, 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-27041?

CVE-2024-27041 is a medium-severity vulnerability in Linux kernel, published on 1 May 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/amd/display: fix NULL checks for adev->dm.dc in amdgpu_dm_fini()

Since 'adev->dm.dc' in amdgpu_dm_fini() might turn out to be NULL before the call to dc_enable_dmub_notifications(), check beforehand to ensure there will not be a possible NULL-ptr-deref there.

Also, since commit 1e88eb1b2c25 ("drm/amd/display: Drop CONFIG_DRM_AMD_DC_HDCP") there are two separate checks for NULL in 'adev->dm.dc' before dc_deinit_callbacks() and dc_dmub_srv_destroy(). Clean up by combining them all under one 'if'.

Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE.

Weakness: CWE-476

Which versions are affected by CVE-2024-27041?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-27041?

Apply the vendor's patch.

Is CVE-2024-27041 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-59619, BELL-CVE-2024-27041, DEBIAN-CVE-2024-27041, GHSA-vxpv-rv2q-v5r7, ROOT-OS-DEBIAN-12-CVE-2024-27041, ROOT-OS-UBUNTU-2204-CVE-2024-27041 and 1 more.

Is CVE-2024-27041 in your software?

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

Check your SBOMs for free