CVE-2024-57922: drm/amd/display: Add check for granularity in dml ceil/floor helpers
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Add check for granularity in dml ceil/floor helpers
[Why]
Wrapper functions for dcn_bw_ceil2() and dcn_bw_floor2() should check for granularity is non zero to avoid assert and divide-by-zero error in dcn_bw_ functions.
[How]
Add check for granularity 0.
(cherry picked from commit f6e09701c3eb2ccb8cb0518e0b67f1c69742a4ec)
The Linux kernel CVE team has assigned CVE-2024-57922 to this issue.
Affected and fixed versions
===========================
Fixed in 6.1.125 with commit f3d1e4062ef251fa55ccfeca1e54a98b6818b3a1 Fixed in 6.6.72 with commit ae9ab63a268be99a27a4720ca24f6be801744fee Fixed in 6.12.10 with commit 4f0dd09ed3001725ffd8cdc2868e71df585392fe Fixed in 6.13-rc7 with commit 0881fbc4fd62e00a2b8e102725f76d10351b2ea8
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-57922
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/dml_inline_defs.h
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/f3d1e4062ef251fa55ccfeca1e54a98b6818b3a1 https://git.kernel.org/stable/c/ae9ab63a268be99a27a4720ca24f6be801744fee https://git.kernel.org/stable/c/4f0dd09ed3001725ffd8cdc2868e71df585392fe https://git.kernel.org/stable/c/0881fbc4fd62e00a2b8e102725f76d10351b2ea8