CVE-2025-21996 drm/radeon: fix uninitialized size issue in radeon_vce_cs_parse()

Medium 5.5 Published Updated

A local attacker can cause a denial of service in the Linux kernel by triggering an uninitialized variable usage in the Radeon VCE driver.

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-21996?

CVE-2025-21996 is a medium-severity vulnerability in Linux kernel, published on 3 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/radeon: fix uninitialized size issue in radeon_vce_cs_parse()

On the off chance that command stream passed from userspace via ioctl() call to radeon_vce_cs_parse() is weirdly crafted and first command to execute is to encode (case 0x03000001), the function in question will attempt to call radeon_vce_cs_reloc() with size argument that has not been properly initialized. Specifically, 'size' will point to 'tmp' variable before the latter had a chance to be assigned any value.

Play it safe and init 'tmp' with 0, thus ensuring that radeon_vce_cs_reloc() will catch an early error in cases like these.

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

(cherry picked from commit 2d52de55f9ee7aaee0e09ac443f77855989c6b68)

Weakness: CWE-908

Which versions are affected by CVE-2025-21996?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21996?

Apply the vendor's patch.

Is CVE-2025-21996 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-60252, AZL-60258, BELL-CVE-2025-21996, DEBIAN-CVE-2025-21996, GHSA-p42v-4mrm-3j3g, ROOT-OS-UBUNTU-2404-CVE-2025-21996 and 1 more.

Is CVE-2025-21996 in your software?

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

Check your SBOMs for free