]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: usbtest: fix NULL pointer dereference
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 29 Sep 2017 14:54:24 +0000 (10:54 -0400)
committerJack Vogel <jack.vogel@oracle.com>
Wed, 7 Mar 2018 05:17:03 +0000 (21:17 -0800)
commit89a853b3ec4200629c82357e223fb9a94176800f
tree072e768107083e0ece30b7af31dae133a0593f73
parent935740174737578ab61a6c2af5a7051faab289ab
usb: usbtest: fix NULL pointer dereference

If the usbtest driver encounters a device with an IN bulk endpoint but
no OUT bulk endpoint, it will try to dereference a NULL pointer
(out->desc.bEndpointAddress).  The problem can be solved by adding a
missing test.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
(cherry picked from commit 7c80f9e4a588f1925b07134bb2e3689335f6c6d8)

Orabug: 27602322
CVE: CVE-2017-16532
Signed-off-by: Tim Tianyang Chen <tianyang.chen@oracle.com>
Reviewed-by: Ashok Vairavan <ashok.vairavan@oracle.com>
drivers/usb/misc/usbtest.c