CVE-2022-49294: drm/amd/display: Check if modulo is 0 before dividing.
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Check if modulo is 0 before dividing.
[How & Why]
If a value of 0 is read, then this will cause a divide-by-0 panic.
The Linux kernel CVE team has assigned CVE-2022-49294 to this issue.
Affected and fixed versions
===========================
Fixed in 5.15.47 with commit 10ef82d6e0af5536ec64770c07f6bbabfdd6977c Fixed in 5.17.15 with commit 96725758eff7b3805e4e94d1443a100757412720 Fixed in 5.18.4 with commit 07efce8269a038c37814eb656b4de14aa3015fc6 Fixed in 5.19 with commit 49947b906a6bd9668eaf4f9cf691973c25c26955
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-2022-49294
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/dce/dce_clock_source.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/10ef82d6e0af5536ec64770c07f6bbabfdd6977c https://git.kernel.org/stable/c/96725758eff7b3805e4e94d1443a100757412720 https://git.kernel.org/stable/c/07efce8269a038c37814eb656b4de14aa3015fc6 https://git.kernel.org/stable/c/49947b906a6bd9668eaf4f9cf691973c25c26955