mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 02:58:57 +07:00
1c069b057d
Andrey Konovalov's fuzz testing of gadgetfs showed that we should improve the driver's checks for valid configuration descriptors passed in by the user. In particular, the driver needs to verify that the wTotalLength value in the descriptor is not too short (smaller than USB_DT_CONFIG_SIZE). And the check for whether wTotalLength is too large has to be changed, because the driver assumes there is always enough room remaining in the buffer to hold a device descriptor (at least USB_DT_DEVICE_SIZE bytes). This patch adds the additional check and fixes the existing check. It may do a little more than strictly necessary, but one extra check won't hurt. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Andrey Konovalov <andreyknvl@google.com> CC: <stable@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> |
||
---|---|---|
.. | ||
acm_ms.c | ||
audio.c | ||
cdc2.c | ||
dbgp.c | ||
ether.c | ||
g_ffs.c | ||
gmidi.c | ||
hid.c | ||
inode.c | ||
Kconfig | ||
Makefile | ||
mass_storage.c | ||
multi.c | ||
ncm.c | ||
nokia.c | ||
printer.c | ||
serial.c | ||
tcm_usb_gadget.c | ||
webcam.c | ||
zero.c |