CVE-2024-50187 drm/vc4: Stop the active perfmon before being destroyed

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's vc4 DRM driver allows attackers to cause denial of service or potentially execute code via stale pointers.

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

CVE-2024-50187 is a high-severity use after free vulnerability in Linux kernel, published on 8 Nov 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: Stop the active perfmon before being destroyed

Upon closing the file descriptor, the active performance monitor is not stopped. Although all perfmons are destroyed in `vc4_perfmon_close_file()`, the active performance monitor's pointer (`vc4->active_perfmon`) is still retained.

If we open a new file descriptor and submit a few jobs with performance monitors, the driver will attempt to stop the active performance monitor using the stale pointer in `vc4->active_perfmon`. However, this pointer is no longer valid because the previous process has already terminated, and all performance monitors associated with it have been destroyed and freed.

To fix this, when the active performance monitor belongs to a given process, explicitly stop it before destroying and freeing it.

Which versions are affected by CVE-2024-50187?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-50187?

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-2024-50187 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-53723, BELL-CVE-2024-50187, DEBIAN-CVE-2024-50187, GHSA-4p6c-9pp4-835h, ROOT-OS-DEBIAN-11-CVE-2024-50187, ROOT-OS-UBUNTU-2204-CVE-2024-50187 and 1 more.

Is CVE-2024-50187 in your software?

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

Check your SBOMs for free