drm/amd/display: avoid divide-by-zero in __is_lut_linear()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 086247a4b2fba49800b27807f22bb894cd8363fb · < ee28fafb50f58b847509b5240b431ddec673bdfe| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: avoid divide-by-zero in __is_lut_linear()
__is_lut_linear() computes the expected value of each entry with
expected = i * MAX_DRM_LUT_VALUE / (size - 1);
If it is ever called with a single-entry LUT, size - 1 is zero and the kernel takes a divide error (#DE). A LUT with fewer than two entries cannot describe a linear mapping anyway, so return false early instead of dividing by zero.
From the CVE record · Linux
The Linux kernel’s AMD display code can divide by zero when its LUT linearity check receives a single-entry LUT, causing a kernel divide error. The input does not establish whether an attacker can trigger this condition, or specify access or user-interaction requirements.
Engineers running Linux kernels with AMD display support should check whether their kernel is affected; affected versions are not specified.