CVE-2021-47533 drm/vc4: kms: Clear the HVS FIFO commit pointer once done

High 7.8 Published Updated

A use-after-free in the Linux kernel's VC4 DRM driver allows attackers to potentially execute code or escalate privileges via state duplication.

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-2021-47533?

CVE-2021-47533 is a high-severity use after free vulnerability in Linux kernel, published on 24 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/vc4: kms: Clear the HVS FIFO commit pointer once done

Commit 9ec03d7f1ed3 ("drm/vc4: kms: Wait on previous FIFO users before a commit") introduced a wait on the previous commit done on a given HVS FIFO.

However, we never cleared that pointer once done. Since drm_crtc_commit_put can free the drm_crtc_commit structure directly if we were the last user, this means that it can lead to a use-after free if we were to duplicate the state, and that stale pointer would even be copied to the new state.

Set the pointer to NULL once we're done with the wait so that we don't carry over a pointer to a free'd structure.

Weakness: CWE-416

Which versions are affected by CVE-2021-47533?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47533?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2021-47533 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47533, UBUNTU-CVE-2021-47533.

Is CVE-2021-47533 in your software?

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

Check your SBOMs for free