Commit 53fd0a8d authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Gerrit - the friendly Code Review server
Browse files

UPSTREAM: USB: gadget: detect too-big endpoint 0 requests



Sometimes USB hosts can ask for buffers that are too large from endpoint
0, which should not be allowed.  If this happens for OUT requests, stall
the endpoint, but for IN requests, trim the request size to the endpoint
buffer size.

Co-developed-by: default avatarSzymon Heidrich <szymon.heidrich@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 153a2d7e)
Bug: 210292367
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I9bbd6154177d7a1fb6c2e3a3dffa96634d85bb7f
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Git-commit: f92d5da0
Git-repo: https://android.googlesource.com/kernel/common


Signed-off-by: default avatarPavanKumar S.R <quic_pavasr@quicinc.com>
parent e6040df4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment