Subject: CVE-2023-52819: drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga

For pptable structs that use flexible array sizes, use flexible arrays.

The Linux kernel CVE team has assigned CVE-2023-52819 to this issue.

Affected and fixed versions
===========================

	Fixed in 4.14.331 with commit 60a00dfc7c5d
	Fixed in 4.19.300 with commit a63fd579e7b1
	Fixed in 5.4.262 with commit d50a56749e5a
	Fixed in 5.10.202 with commit 8c1dbddbfcb0
	Fixed in 5.15.140 with commit a237675aa1e6
	Fixed in 6.1.64 with commit d0725232da77
	Fixed in 6.5.13 with commit 7c68283f3166
	Fixed in 6.6.3 with commit b3b8b7c040cf
	Fixed in 6.7 with commit 0f0e59075b5c

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-52819
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/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/60a00dfc7c5deafd1dd393beaf53224f7256dad6
	https://git.kernel.org/stable/c/a63fd579e7b1c3a9ebd6e6c494d49b1b6cf5515e
	https://git.kernel.org/stable/c/d50a56749e5afdc63491b88f5153c1aae00d4679
	https://git.kernel.org/stable/c/8c1dbddbfcb051e82cea0c197c620f9dcdc38e92
	https://git.kernel.org/stable/c/a237675aa1e62bbfaa341c535331c8656a508fa1
	https://git.kernel.org/stable/c/d0725232da777840703f5f1e22f2e3081d712aa4
	https://git.kernel.org/stable/c/7c68283f3166221af3df5791f0e13d3137a72216
	https://git.kernel.org/stable/c/b3b8b7c040cf069da7afe11c5bd73b870b8f3d18
	https://git.kernel.org/stable/c/0f0e59075b5c22f1e871fbd508d6e4f495048356