linux/drivers/w1/masters
Alan Stern ef6b71388a USB: w1 ds2490: Fix bug caused by improper use of altsetting array
commit c114944d7d upstream.

The syzkaller USB fuzzer spotted a slab-out-of-bounds bug in the
ds2490 driver.  This bug is caused by improper use of the altsetting
array in the usb_interface structure (the array's entries are not
always stored in numerical order), combined with a naive assumption
that all interfaces probed by the driver will have the expected number
of altsettings.

The bug can be fixed by replacing references to the possibly
non-existent intf->altsetting[alt] entry with the guaranteed-to-exist
intf->cur_altsetting entry.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-and-tested-by: syzbot+d65f673b847a1a96cdba@syzkaller.appspotmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-08-13 12:39:15 +01:00
..
ds1wm.c Revert ds1wm.c from "w1: hold bus_mutex in netlink and search" 2014-02-08 13:30:43 -08:00
ds2482.c w1: ds2482: Added 1-Wire pull-up support to the driver 2013-02-18 12:47:12 -08:00
ds2490.c USB: w1 ds2490: Fix bug caused by improper use of altsetting array 2019-08-13 12:39:15 +01:00
Kconfig w1: mxc_w1: Enable driver compilation with COMPILE_TEST 2014-02-28 15:27:09 -08:00
Makefile w1: add 1-wire master driver for i.MX27 / i.MX31 2009-01-08 08:31:13 -08:00
matrox_w1.c w1: remove use of __devexit 2012-11-21 12:42:25 -08:00
mxc_w1.c w1: mxc_w1: Enable clock before calling clk_get_rate() on it 2018-11-20 18:04:54 +00:00
omap_hdq.c w1: omap-hdq: fix missing bus unregister at removal 2019-02-11 17:53:25 +00:00
w1-gpio.c w1-gpio: handle of_get_gpio() returning -EPROBE_DEFER better 2014-02-15 12:08:38 -08:00