kernel_samsung_a53x/drivers/media/usb/gspca
Rajeshwar R Shinde 1b187400f9 media: gspca: cpia1: shift-out-of-bounds in set_flicker
[ Upstream commit 099be1822d1f095433f4b08af9cc9d6308ec1953 ]

Syzkaller reported the following issue:
UBSAN: shift-out-of-bounds in drivers/media/usb/gspca/cpia1.c:1031:27
shift exponent 245 is too large for 32-bit type 'int'

When the value of the variable "sd->params.exposure.gain" exceeds the
number of bits in an integer, a shift-out-of-bounds error is reported. It
is triggered because the variable "currentexp" cannot be left-shifted by
more than the number of bits in an integer. In order to avoid invalid
range during left-shift, the conditional expression is added.

Reported-by: syzbot+e27f3dbdab04e43b9f73@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/20230818164522.12806-1-coolrrsh@gmail.com
Link: https://syzkaller.appspot.com/bug?extid=e27f3dbdab04e43b9f73
Signed-off-by: Rajeshwar R Shinde <coolrrsh@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 11:43:14 +01:00
..
gl860 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
m5602 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stv06xx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
autogain_functions.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
benq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
conex.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpia1.c media: gspca: cpia1: shift-out-of-bounds in set_flicker 2024-11-18 11:43:14 +01:00
dtcs033.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
etoms.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
finepix.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gspca.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gspca.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jeilinj.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jl2005bcd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jpeg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kinect.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
konica.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mars.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mr97310a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nw80x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ov519.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ov534.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ov534_9.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pac207.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pac7302.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pac7311.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pac_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
se401.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
se401.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sn9c20x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sn9c2028.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sn9c2028.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sonixb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sonixj.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca500.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca501.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca505.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca506.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca508.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca561.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca1528.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sq905.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sq905c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sq930x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stk014.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stk1135.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stk1135.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stv0680.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunplus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
t613.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
topro.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
touptek.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tv8532.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vc032x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vicam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w996Xcf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xirlink_cit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zc3xx-reg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zc3xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00