CVE-2025-21985 drm/amd/display: Fix out-of-bound accesses

High 7.8 Published Updated

An out-of-bounds access in the AMD display driver allows attackers to cause memory corruption, potentially leading to system crashes or arbitrary code execution.

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-2025-21985?

CVE-2025-21985 is a high-severity memory corruption vulnerability in Linux kernel, published on 1 Apr 2025. 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 out-of-bound accesses

[WHAT & HOW] hpo_stream_to_link_encoder_mapping has size MAX_HPO_DP2_ENCODERS(=4), but location can have size up to 6. As a result, it is necessary to check location against MAX_HPO_DP2_ENCODERS.

Similiarly, disp_cfg_stream_location can be used as an array index which should be 0..5, so the ASSERT's conditions should be less without equal.

Weakness: CWE-125

Which versions are affected by CVE-2025-21985?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21985?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-21985 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-62672, BELL-CVE-2025-21985, DEBIAN-CVE-2025-21985, GHSA-6hmr-pwgj-w283, ROOT-OS-DEBIAN-11-CVE-2025-21985, ROOT-OS-DEBIAN-12-CVE-2025-21985 and 3 more.

Is CVE-2025-21985 in your software?

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

Check your SBOMs for free