linux-stable/drivers/usb/gadget
Krishna Kurapati 427694cfaa usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call
When NCM is used with hosts like Windows PC, it is observed that there are
multiple NTB's contained in one usb request giveback. Since the driver
unwraps the obtained request data assuming only one NTB is present, we
loose the subsequent NTB's present resulting in data loss.

Fix this by checking the parsed block length with the obtained data
length in usb request and continue parsing after the last byte of current
NTB.

Cc: stable@vger.kernel.org
Fixes: 9f6ce4240a ("usb: gadget: f_ncm.c added")
Signed-off-by: Krishna Kurapati <quic_kriskura@quicinc.com>
Reviewed-by: Maciej Żenczykowski <maze@google.com>
Link: https://lore.kernel.org/r/20230927105858.12950-1-quic_kriskura@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-02 13:38:10 +02:00
..
function usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call 2023-10-02 13:38:10 +02:00
legacy v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
udc usb: gadget: udc-xilinx: fix incorrect type in assignment warning 2023-08-22 14:46:45 +02:00
composite.c usb: gadget: composite: cleanup function config_ep_by_speed_and_alt() 2023-08-22 14:48:33 +02:00
config.c usb: gadget: config: remove max speed check in usb_assign_descriptors() 2023-08-22 14:48:33 +02:00
configfs.c usb: gadget: Properly configure the device for remote wakeup 2023-03-29 10:27:00 +02:00
configfs.h
epautoconf.c
functions.c
Kconfig usb: gadget: Add support for USB MIDI 2.0 function driver 2023-07-26 06:38:14 +02:00
Makefile usb: gadget: Makefile: remove ccflags-y 2022-03-18 12:56:08 +01:00
u_f.c
u_f.h
u_os_desc.h
usbstring.c