]> git.baikalelectronics.ru Git - kernel.git/commit
USB: gadget: zero allocate endpoint 0 buffers
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Dec 2021 18:02:15 +0000 (19:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Dec 2021 12:05:10 +0000 (13:05 +0100)
commit4f22ffe40b61e85e037c5f962548020f90d25dab
tree8c69a2eed0fa542c57511c5dbde14dc8f7b1f091
parentcd2e37b03796e3a0c524d19998d3159cbfe948c3
USB: gadget: zero allocate endpoint 0 buffers

Under some conditions, USB gadget devices can show allocated buffer
contents to a host.  Fix this up by zero-allocating them so that any
extra data will all just be zeros.

Reported-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Tested-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/composite.c
drivers/usb/gadget/legacy/dbgp.c