ASoC: max98090: Move check for invalid values before casting in max98090_put_enab_tlv()
stable inclusion from stable-v5.10.121 commit 7386f69041594f186045e01d5f2ca2f675a30916 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7386f69041594f186045e01d5f2ca2f675a30916 -------------------------------- [ Upstream commit f7a34446 ] Validation of signed input should be done before casting to unsigned int. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Suggested-by: NMark Brown <broonie@kernel.org> Fixes: 2fbe467b ("ASoC: max98090: Reject invalid values in custom control put()") Link: https://lore.kernel.org/r/1652999486-29653-1-git-send-email-khoroshilov@ispras.ruSigned-off-by: NMark Brown <broonie@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Showing
想要评论请 注册 或 登录