Subject: CVE-2022-48852: drm/vc4: hdmi: Unregister codec device on unbind

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

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

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

drm/vc4: hdmi: Unregister codec device on unbind

On bind we will register the HDMI codec device but we don't unregister
it on unbind, leading to a device leakage. Unregister our device at
unbind.

The Linux kernel CVE team has assigned CVE-2022-48852 to this issue.

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

	Fixed in 5.15.29 with commit ee22082c3e2f
	Fixed in 5.16.15 with commit 1ed68d776246
	Fixed in 5.17 with commit e40945ab7c7f

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-48852
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/vc4/vc4_hdmi.c
	drivers/gpu/drm/vc4/vc4_hdmi.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/ee22082c3e2f230028afa0e22aa8773b1de3c919
	https://git.kernel.org/stable/c/1ed68d776246f167aee9cd79f63f089c40a5e2a3
	https://git.kernel.org/stable/c/e40945ab7c7f966d0c37b7bd7b0596497dfe228d