linux/drivers/usb/gadget
Yang Yingliang a932ee40c2 usb: gadget: tegra-xudc: Fix possible use-after-free in tegra_xudc_remove()
This driver's remove path calls cancel_delayed_work(). However, that
function does not wait until the work function finishes. This means
that the callback function may still be running after the driver's
remove function has finished, which would result in a use-after-free.

Fix by calling cancel_delayed_work_sync(), which ensures that
the work is properly cancelled, no longer running, and unable
to re-schedule itself.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210407092947.3271507-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09 16:02:33 +02:00
..
function USB: gadget: f_fs: fix memdup_user.cocci warnings 2021-03-23 15:24:26 +01:00
legacy usb: gadget: legacy: fix error return code of msg_bind() 2021-03-23 14:13:29 +01:00
udc usb: gadget: tegra-xudc: Fix possible use-after-free in tegra_xudc_remove() 2021-04-09 16:02:33 +02:00
composite.c usb: gadget: composite: Report various SSP sublink speeds 2021-01-18 18:41:11 +01:00
config.c
configfs.c usb: gadget: configfs: Fix KASAN use-after-free 2021-03-17 21:29:46 +01:00
configfs.h
epautoconf.c
functions.c
Kconfig usb: gadget: select CONFIG_CRC32 2021-01-04 16:54:29 +01:00
Makefile
u_f.c
u_f.h
u_os_desc.h
usbstring.c