commit | 7193ad3e50e596ac2192531c58ba83b9e6d2444b | [log] [tgz] |
---|---|---|
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Thu Dec 09 18:59:27 2021 +0100 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Tue Dec 14 11:32:43 2021 +0100 |
tree | f51941f5e983535a964d1e7325bf9c0571c76d96 | |
parent | 63fc70bffa16de431a51da7f530011de1b469780 [diff] |
USB: gadget: detect too-big endpoint 0 requests commit 153a2d7e3350cc89d406ba2d35be8793a64c2038 upstream. 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: Szymon Heidrich <szymon.heidrich@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>