Commit eae46d78 authored by Marek Vasut's avatar Marek Vasut Committed by Jialin Zhang
Browse files

ASoC: ops: Shift tested values in snd_soc_put_volsw() by +min

stable inclusion
from stable-v4.19.233
commit 0b2ecc9163472128e7f30b517bee92dcd27ffc34
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA72DZ
CVE: CVE-2022-48738

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0b2ecc9163472128e7f30b517bee92dcd27ffc34



--------------------------------

commit 9bdd10d5 upstream.

While the $val/$val2 values passed in from userspace are always >= 0
integers, the limits of the control can be signed integers and the $min
can be non-zero and less than zero. To correctly validate $val/$val2
against platform_max, add the $min offset to val first.

Fixes: 817f7c93 ("ASoC: ops: Reject out of bounds values in snd_soc_put_volsw()")
Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220215130645.164025-1-marex@denx.de


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJialin Zhang <zhangjialin11@huawei.com>
parent 072d33e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment