CVE-2024-46726: drm/amd/display: Ensure index calculation will not overflow
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Ensure index calculation will not overflow
[WHY & HOW]
Make sure vmid0p72_idx, vnom0p8_idx and vmax0p9_idx calculation will never overflow and exceess array size.
This fixes 3 OVERRUN and 1 INTEGER_OVERFLOW issues reported by Coverity.
The Linux kernel CVE team has assigned CVE-2024-46726 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.109 with commit 733ae185502d Fixed in 6.6.50 with commit 3dc6bb57dab3 Fixed in 6.10.9 with commit d705b5869f6b Fixed in 6.11 with commit 8e2734bf4447
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-46726
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/733ae185502d30bbe79575167b6178cfb6c5d6bd https://git.kernel.org/stable/c/3dc6bb57dab36b38b7374af0ac916174c146b6ed https://git.kernel.org/stable/c/d705b5869f6b1b46ad5ceb1bd2a08c04f7e5003b https://git.kernel.org/stable/c/8e2734bf444767fed787305ccdcb36a2be5301a2