Subject: CVE-2022-48655: firmware: arm_scmi: Harden accesses to the reset domains

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

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

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

firmware: arm_scmi: Harden accesses to the reset domains

Accessing reset domains descriptors by the index upon the SCMI drivers
requests through the SCMI reset operations interface can potentially
lead to out-of-bound violations if the SCMI driver misbehave.

Add an internal consistency check before any such domains descriptors
accesses.

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

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

	Issue introduced in 5.4 with commit 95a15d80aa0d and fixed in 5.4.277 with commit 7184491fc515
	Issue introduced in 5.4 with commit 95a15d80aa0d and fixed in 5.10.218 with commit f2277d9e2a0d
	Issue introduced in 5.4 with commit 95a15d80aa0d and fixed in 5.15.71 with commit 1f08a1b26cfc
	Issue introduced in 5.4 with commit 95a15d80aa0d and fixed in 5.19.12 with commit 8e65edf0d376
	Issue introduced in 5.4 with commit 95a15d80aa0d and fixed in 6.0 with commit e9076ffbcaed

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-48655
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/firmware/arm_scmi/reset.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/7184491fc515f391afba23d0e9b690caaea72daf
	https://git.kernel.org/stable/c/f2277d9e2a0d092c13bae7ee82d75432bb8b5108
	https://git.kernel.org/stable/c/1f08a1b26cfc53b7715abc46857c6023bb1b87de
	https://git.kernel.org/stable/c/8e65edf0d37698f7a6cb174608d3ec7976baf49e
	https://git.kernel.org/stable/c/e9076ffbcaed5da6c182b144ef9f6e24554af268