drm/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.407.1.57.2In the Linux kernel, the following vulnerability has been resolved:
drm/rockchip: dw_dp: Fix null-ptr-deref in dw_dp_remove()
Attempting to access driver data in the platform driver ->remove() callback may lead to a null pointer dereference since there is no guaranty that the component ->bind() callback invoking platform_set_drvdata() was executed.
A common scenario is when Rockchip DRM driver didn't manage to run component_bind_all() because of an (unrelated) error causing early return from rockchip_drm_bind().
Drop the unnecessary call to platform_get_drvdata() and, instead, reference the target device structure via platform_device.
From the CVE record · Linux
The Linux kernel’s Rockchip DRM dw_dp removal callback can dereference a null pointer if the component bind callback did not run, such as when an unrelated error caused binding to return early. This can occur during device removal; the input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with the Rockchip DRM dw_dp driver should check their kernel version; affected versions were not provided.