Loading
media: cx24116: prevent overflows on SNR calculus
stable inclusion from stable-v5.10.230 commit 828047c70f4716fde4b1316f7b610e97a4e83824 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB5AVY CVE: CVE-2024-50290 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=828047c70f4716fde4b1316f7b610e97a4e83824 -------------------------------- commit 576a307a7650bd544fbb24df801b9b7863b85e2f upstream. as reported by Coverity, if reading SNR registers fail, a negative number will be returned, causing an underflow when reading SNR registers. Prevent that. Fixes: 8953db79 ("V4L/DVB (9178): cx24116: Add module parameter to return SNR as ESNO.") Cc: stable@vger.kernel.org Signed-off-by:Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Li Nan <linan122@huawei.com>