CVE-2023-52818: drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7
For pptable structs that use flexible array sizes, use flexible arrays.
The Linux kernel CVE team has assigned CVE-2023-52818 to this issue.
Affected and fixed versions
===========================
Fixed in 4.14.331 with commit e52e324a2134 Fixed in 4.19.300 with commit cfd8cd907fd9 Fixed in 5.4.262 with commit c847379a5d00 Fixed in 5.10.202 with commit 8af28ae3acb7 Fixed in 5.15.140 with commit acdb6830de02 Fixed in 6.1.64 with commit fc9ac0e8e0bc Fixed in 6.5.13 with commit 6dffdddfca81 Fixed in 6.6.3 with commit 92a775e7c970 Fixed in 6.7 with commit 760efbca74a4
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-2023-52818
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/include/pptable.h drivers/gpu/drm/amd/pm/powerplay/hwmgr/pptable_v1_0.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/e52e324a21341c97350d5f11de14721c1c609498 https://git.kernel.org/stable/c/cfd8cd907fd94538561479a43aea455f5cf16928 https://git.kernel.org/stable/c/c847379a5d00078ad6fcb1c24230e72c5609342f https://git.kernel.org/stable/c/8af28ae3acb736ada4ce3457662fa446cc913bb4 https://git.kernel.org/stable/c/acdb6830de02cf2873aeaccdf2d9bca4aee50e47 https://git.kernel.org/stable/c/fc9ac0e8e0bcb3740c6eaad3a1a50c20016d422b https://git.kernel.org/stable/c/6dffdddfca818c02a42b6caa1d9845995f0a1f94 https://git.kernel.org/stable/c/92a775e7c9707aed28782bafe636bf87675f5a97 https://git.kernel.org/stable/c/760efbca74a405dc439a013a5efaa9fadc95a8c3