drm/mediatek: Add missing IS_ERR check for ovl_adaptor platform device
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/mediatek: Add missing IS_ERR check for ovl_adaptor platform device
platform_device_register_data() can fail and return an ERR_PTR, but the return value is used without checking, leading to an invalid pointer being stored in ddp_comp[].dev and passed to component_match_add() and mtk_ddp_comp_init(), which could result in a kernel crash.
Add an IS_ERR() check to jump to the error handling path on failure.
From the CVE record · Linux
The Linux kernel’s MediaTek DRM overlay adaptor does not check whether platform device registration failed before using its return value. If registration fails, an invalid pointer can reach subsequent functions and may crash the kernel. The input does not specify an attack path, authentication requirements, or user interaction.
Engineers running Linux kernels with the MediaTek DRM overlay adaptor should check their deployments; affected versions are not specified.