CVE-2024-57798 drm/dp_mst: Ensure mst_primary pointer is valid in drm_dp_mst_handle_up_req()
A race condition in the Linux kernel's DisplayPort MST driver can cause a use-after-free or null dereference, leading to a system crash.
- 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-57798?
CVE-2024-57798 is a high-severity use after free vulnerability in Linux kernel, published on 11 Jan 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/dp_mst: Ensure mst_primary pointer is valid in drm_dp_mst_handle_up_req()
While receiving an MST up request message from one thread in drm_dp_mst_handle_up_req(), the MST topology could be removed from another thread via drm_dp_mst_topology_mgr_set_mst(false), freeing mst_primary and setting drm_dp_mst_topology_mgr::mst_primary to NULL. This could lead to a NULL deref/use-after-free of mst_primary in drm_dp_mst_handle_up_req().
Avoid the above by holding a reference for mst_primary in drm_dp_mst_handle_up_req() while it's used.
v2: Fix kfreeing the request if getting an mst_primary reference fails.
Which versions are affected by CVE-2024-57798?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-57798?
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-57798 being exploited?
There is no known exploitation of CVE-2024-57798 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-56223, AZL-56309, BELL-CVE-2024-57798, DEBIAN-CVE-2024-57798, GHSA-9x94-vh8x-vrhp, ROOT-OS-DEBIAN-11-CVE-2024-57798 and 1 more.