Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 57049607 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Bharath
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 153a2d7e3350cc89d406ba2d35be8793a64c2038)
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>
Issue: FP3SEC-288
(cherry picked from commit d6b6272a)
(cherry picked from commit 46109e216276b4b01b8d32f219b7181ebfc7f4e0)
parent 7469fb41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment