linux/drivers/usb
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
..
atm
c67x00 usb: c67x00-drv: Convert to platform remove callback returning void 2023-05-28 12:36:14 +01:00
cdns3 usb: cdnsp: Fixes issue with dequeuing not queued requests 2023-10-02 13:19:13 +02:00
chipidea usb: chipidea: add workaround for chipidea PEC bug 2023-08-09 14:16:06 +02:00
class TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
common Merge 6.5-rc6 into usb-next 2023-08-14 22:22:31 +02:00
core USB / Thunderbolt / PHY driver update for 6.6-rc1 2023-09-01 09:23:34 -07:00
dwc2 usb: dwc2: add pci_device_id driver_data parse support 2023-08-22 14:49:12 +02:00
dwc3 just cleanups and fixes 2023-09-07 10:35:14 -07:00
early usb: early: xhci-dbc: Use memcpy_and_pad() 2023-01-31 10:40:54 +01:00
fotg210 usb: fotg210: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
gadget usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call 2023-10-02 13:38:10 +02:00
host TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
image scsi: usb: uas: Declare two host templates and host template pointers const 2023-03-24 19:20:00 -04:00
isp1760 usb: isp1760: Convert to platform remove callback returning void 2023-05-28 12:38:01 +01:00
misc USB: misc: Remove unused include file usb_u132.h 2023-08-08 10:36:46 +02:00
mon USB: mon: make mon_bin_class a static const structure 2023-06-20 16:20:45 +02:00
mtu3 usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
musb usb: musb: Get the musb_qh poniter after musb_giveback 2023-10-02 13:37:57 +02:00
phy usb: phy: mxs: disconnect line when USB charger is attached 2023-07-25 18:24:17 +02:00
renesas_usbhs usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
roles USB: roles: make role_class a static const structure 2023-06-20 16:20:40 +02:00
serial TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
storage usb-storage: alauda: Fix uninit-value in alauda_check_media() 2023-08-04 14:57:16 +02:00
typec usb: typec: ucsi: Fix NULL pointer dereference 2023-09-11 13:52:16 +02:00
usbip USB: usbip: Remove an unnecessary goto 2023-08-08 10:36:51 +02:00
Kconfig usb: move config USB_USS720 to usb's misc Kconfig 2023-03-29 10:34:08 +02:00
Makefile usb: host: u132-hcd: Delete driver 2023-03-21 14:06:11 +01:00
usb-skeleton.c usb: add usb_set_intfdata() documentation 2022-11-29 08:56:09 +01:00