1
0
Fork 0
alistair23-linux/drivers/usb/gadget
Bui Quang Minh 52c2ada6fe USB: dummy-hcd: Fix uninitialized array use in init()
commit e90cfa813d upstream.

This error path

	err_add_pdata:
		for (i = 0; i < mod_data.num; i++)
			kfree(dum[i]);

can be triggered when not all dum's elements are initialized.

Fix this by initializing all dum's elements to NULL.

Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Link: https://lore.kernel.org/r/1607063090-3426-1-git-send-email-minhquangbui99@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-21 13:27:05 +01:00
..
function usb: gadget: f_fs: Use local copy of descriptors for userspace copy 2020-12-11 13:23:27 +01:00
legacy usb: gadget: Fix memleak in gadgetfs_fill_super 2020-12-02 08:49:55 +01:00
udc USB: dummy-hcd: Fix uninitialized array use in init() 2020-12-21 13:27:05 +01:00
Kconfig docs: usb: rename files to .rst and add them to drivers-api 2019-06-20 14:28:36 +02:00
Makefile Revert "usb:gadget Separated decoding functions from dwc3 driver." 2019-07-04 13:02:09 +02:00
composite.c usb: gadget: Fix issue with config_ep_by_speed function 2020-06-24 17:50:32 +02:00
config.c USB: gadget: Remove redundant license text 2017-11-07 15:45:02 +01:00
configfs.c USB: gadget: fix illegal array access in binding with UDC 2020-05-20 08:20:31 +02:00
configfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
epautoconf.c usb: gadget: move non-super speed code out of usb_ep_autoconfig_ss() 2019-02-07 13:14:51 +02:00
functions.c USB: add SPDX identifiers to all remaining files in drivers/usb/ 2017-11-04 11:48:02 +01:00
u_f.c usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
u_f.h USB: gadget: u_f: Unbreak offset calculation in VLAs 2020-09-03 11:27:08 +02:00
u_os_desc.h usb: gadget: Change Andrzej Pietrasiewicz's e-mail address 2019-02-11 11:12:29 +02:00
usbstring.c usb/gadget: Constify usb_gadget_get_string "table" argument 2018-05-15 10:06:49 +03:00