summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKrishna Kurapati <quic_kriskura@quicinc.com>2023-09-27 16:28:58 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-25 11:16:36 +0200
commitff3ba016263ee93a1c6209bf5ab1599de7ab1512 (patch)
treeddf176ecbfe8eea2c3596348bdc7976d097b3d26 /include
parentb3c4460e3c50cb16117ac48a0ce56adb75fa6720 (diff)
usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call
commit 427694cfaafa565a3db5c5ea71df6bc095dca92f upstream. 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: 9f6ce4240a2b ("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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions