go7007: add sanity checking for endpoints
authorOliver Neukum <oneukum@suse.com>
Tue, 5 May 2020 10:50:33 +0000 (12:50 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 05:42:57 +0000 (07:42 +0200)
commit137641287eb40260783a4413847a0aef06023a6c
tree3f9a94eff549c3711d81107d026f178dedaa8880
parentebeacb1f612db22020561211c21b4d966cf7ca24
go7007: add sanity checking for endpoints

A malicious USB device may lack endpoints the driver assumes to exist
Accessing them leads to NULL pointer accesses. This patch introduces
sanity checking.

Reported-and-tested-by: syzbot+cabfa4b5b05ff6be4ef0@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Fixes: 866b8695d67e8 ("Staging: add the go7007 video driver")
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/go7007/go7007-usb.c