Subject: CVE-2022-48951: ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx()

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

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

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

ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx()

The bounds checks in snd_soc_put_volsw_sx() are only being applied to the
first channel, meaning it is possible to write out of bounds values to the
second channel in stereo controls. Add appropriate checks.

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

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

	Fixed in 4.9.337 with commit 56288987843c
	Fixed in 4.14.303 with commit cf1c225f1927
	Fixed in 4.19.270 with commit 18a168d85ead
	Fixed in 5.4.228 with commit 9796d07c7531
	Fixed in 5.10.160 with commit 50b5f6d4d9d2
	Fixed in 5.15.84 with commit cf611d786796
	Fixed in 6.0.14 with commit 1798b62d642e
	Fixed in 6.1 with commit 97eea946b939

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-48951
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:
	sound/soc/soc-ops.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/56288987843c3cb343e81e5fa51549cbaf541bd0
	https://git.kernel.org/stable/c/cf1c225f1927891ae388562b78ced7840c3723b9
	https://git.kernel.org/stable/c/18a168d85eadcfd45f015b5ecd2a97801b959e43
	https://git.kernel.org/stable/c/9796d07c753164b7e6b0d7ef23fb4482840a9ef8
	https://git.kernel.org/stable/c/50b5f6d4d9d2d69a7498c44fd8b26e13d73d3d98
	https://git.kernel.org/stable/c/cf611d786796ec33da09d8c83d7d7f4e557b27de
	https://git.kernel.org/stable/c/1798b62d642e7b3d4ea3403914c3caf4e438465d
	https://git.kernel.org/stable/c/97eea946b93961fffd29448dcda7398d0d51c4b2