summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2018-09-10 14:00:53 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-03 17:01:50 -0700
commit08bbab4af04b6087f3b7fba3aa4a79bf7a23244c (patch)
tree7ab788ad6a80a606e0b11d4d03713db8549f52a7 /include
parent49bdc6be0ffc0abd32dbca0d061df04b5ed7e075 (diff)
USB: handle NULL config in usb_find_alt_setting()
commit c9a4cb204e9eb7fa7dfbe3f7d3a674fa530aa193 upstream. usb_find_alt_setting() takes a pointer to a struct usb_host_config as an argument; it searches for an interface with specified interface and alternate setting numbers in that config. However, it crashes if the usb_host_config pointer argument is NULL. Since this is a general-purpose routine, available for use in many places, we want to to be more robust. This patch makes it return NULL whenever the config argument is NULL. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: syzbot+19c3aaef85a89d451eac@syzkaller.appspotmail.com CC: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions