ASoC: max9759: fix underflow in speaker_gain_control_put()
stable inclusion from stable-v4.19.316 commit a0f49d12547d45ea8b0f356a96632dd503941c1e category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IA72GH CVE: CVE-2022-48717 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-4.19.y&id=a0f49d12547d45ea8b0f356a96632dd503941c1e -------------------------------- commit 4c907bcd upstream. Check for negative values of "priv->gain" to prevent an out of bounds access. The concern is that these might come from the user via: -> snd_ctl_elem_write_user() -> snd_ctl_elem_write() -> kctl->put() Fixes: fa8d9151 ("ASoC: max9759: Add Amplifier Driver") Signed-off-by:Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20220119123101.GA9509@kili Signed-off-by:
Mark Brown <broonie@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Wenyu Huang <huangwenyu5@huawei.com>
Loading
Please sign in to comment