Subject: CVE-2021-47487: drm/amdgpu: fix out of bounds write

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

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

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

drm/amdgpu: fix out of bounds write

Size can be any value and is user controlled resulting in overwriting the
40 byte array wr_buf with an arbitrary length of data from buf.

The Linux kernel CVE team has assigned CVE-2021-47487 to this issue.

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

	Fixed in 5.10.77 with commit eb3b6805e3e9
	Fixed in 5.14.16 with commit d3ed72495a59
	Fixed in 5.15 with commit 5afa7898ab7a

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-2021-47487
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/amdgpu_dm/amdgpu_dm_debugfs.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/eb3b6805e3e9d98b2507201fd061a231988ce623
	https://git.kernel.org/stable/c/d3ed72495a59fbfb9377450c8dfe94389a6509a7
	https://git.kernel.org/stable/c/5afa7898ab7a0ec9c28556a91df714bf3c2f725e