CVE-2025-38240 drm/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr
A NULL pointer dereference in the MediaTek DisplayPort driver can cause a kernel crash during hotplug detection, leading to denial of service.
- 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-38240?
CVE-2025-38240 is a medium-severity vulnerability in Linux kernel, published on 18 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/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr
The function mtk_dp_wait_hpd_asserted() may be called before the `mtk_dp->drm_dev` pointer is assigned in mtk_dp_bridge_attach(). Specifically it can be called via this callpath: - mtk_edp_wait_hpd_asserted - [panel probe] - dp_aux_ep_probe
Using "drm" level prints anywhere in this callpath causes a NULL pointer dereference. Change the error message directly in mtk_dp_wait_hpd_asserted() to dev_err() to avoid this. Also change the error messages in mtk_dp_parse_capabilities(), which is called by mtk_dp_wait_hpd_asserted().
While touching these prints, also add the error code to them to make future debugging easier.
Weakness: CWE-476
Which versions are affected by CVE-2025-38240?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-38240?
Apply the vendor's patch.
Is CVE-2025-38240 being exploited?
There is no known exploitation of CVE-2025-38240 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-38240, DEBIAN-CVE-2025-38240, GHSA-2627-h6q4-h8xq, ROOT-OS-UBUNTU-2404-CVE-2025-38240, UBUNTU-CVE-2025-38240.