media: v4l2-ctrls.c: fix shift-out-of-bounds in std_validate
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 20 Jan 2021 08:28:02 +0000 (09:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Mar 2021 11:20:42 +0000 (12:20 +0100)
commita72c45f4ee33988ff2db4cba91b9daa75869e047
treeded82d509106357001236b8113369b67427b438a
parentedaa0a0aab6e63b2ea7747f14daa68808ea4f36b
media: v4l2-ctrls.c: fix shift-out-of-bounds in std_validate

commit 048c96e28674f15c0403deba2104ffba64544a06 upstream.

If a menu has more than 64 items, then don't check menu_skip_mask
for items 65 and up.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: syzbot+42d8c7c3d3e594b34346@syzkaller.appspotmail.com
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/v4l2-core/v4l2-ctrls.c