drm/exynos: vidi: use priv->vidi_dev for ctx lookup in vidi_connection_ioctl()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ cf67cc9a29ac19c98bc4fa0e6d14b0c1f592d322 · < b5fc86d753dd4c281a943b92f0eef02d31af03d7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/exynos: vidi: use priv->vidi_dev for ctx lookup in vidi_connection_ioctl()
vidi_connection_ioctl() retrieves the driver_data from drm_dev->dev to obtain a struct vidi_context pointer. However, drm_dev->dev is the exynos-drm master device, and the driver_data contained therein is not the vidi component device, but a completely different device.
This can lead to various bugs, ranging from null pointer dereferences and garbage value accesses to, in unlucky cases, out-of-bounds errors, use-after-free errors, and more.
To resolve this issue, we need to store/delete the vidi device pointer in exynos_drm_private->vidi_dev during bind/unbind, and then read this exynos_drm_private->vidi_dev within ioctl() to obtain the correct struct vidi_context pointer.
From the CVE record · Linux
The Exynos VIDI connection ioctl can look up a device context from the wrong device. A local caller able to invoke the ioctl may trigger null-pointer dereferences, invalid memory accesses, or use-after-free errors.
Teams running Linux kernels with the Exynos VIDI component should check their exposure; affected versions were not specified.