Subject: CVE-2021-47144: drm/amd/amdgpu: fix refcount leak

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

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

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

drm/amd/amdgpu: fix refcount leak

[Why]
the gem object rfb->base.obj[0] is get according to num_planes
in amdgpufb_create, but is not put according to num_planes

[How]
put rfb->base.obj[0] in amdgpu_fbdev_destroy according to num_planes

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

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

	Fixed in 4.19.193 with commit 599e5d61ace9
	Fixed in 5.4.124 with commit dde2656e0bbb
	Fixed in 5.10.42 with commit 9fdb8ed37a3a
	Fixed in 5.12.9 with commit 95a4ec905e51
	Fixed in 5.13 with commit fa7e6abc75f3

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-47144
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/amdgpu/amdgpu_fb.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/599e5d61ace952b0bb9bd942b198bbd0cfded1d7
	https://git.kernel.org/stable/c/dde2656e0bbb2ac7d83a7bd95a8d5c3c95bbc009
	https://git.kernel.org/stable/c/9fdb8ed37a3a44f9c49372b69f87fd5f61cb3240
	https://git.kernel.org/stable/c/95a4ec905e51a30c64cf2d78b04a7acbeae5ca94
	https://git.kernel.org/stable/c/fa7e6abc75f3d491bc561734312d065dc9dc2a77