drm/mediatek: Add 0 size check to mtk_drm_gem_obj
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 119f5173628aa7a0c3cf9db83460d40709e8241d · < af26ea99019caee1500bf7e60c861136c0bf8594| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/mediatek: Add 0 size check to mtk_drm_gem_obj
Add a check to mtk_drm_gem_init if we attempt to allocate a GEM object of 0 bytes. Currently, no such check exists and the kernel will panic if a userspace application attempts to allocate a 0x0 GBM buffer.
Tested by attempting to allocate a 0x0 GBM buffer on an MT8188 and verifying that we now return EINVAL.
From the CVE record · Linux
The Linux kernel’s MediaTek DRM GEM initialization lacks a check for zero-byte allocations. A local userspace application can trigger a kernel panic by attempting to allocate a 0x0 GBM buffer.
Engineers running Linux kernels with MediaTek DRM support should check whether their kernel includes the zero-size allocation fix; affected versions were not specified.