usb: gadget: rndis: check size of RNDIS_MSG_SET command
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Feb 2022 15:37:53 +0000 (16:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Feb 2022 09:59:17 +0000 (10:59 +0100)
commit38ea1eac7d88072bbffb630e2b3db83ca649b826
tree9a3d222109493f7efac34eb24e2475463a56d692
parent75e5b4849b81e19e9efe1654b30d7f3151c33c2c
usb: gadget: rndis: check size of RNDIS_MSG_SET command

Check the size of the RNDIS_MSG_SET command given to us before
attempting to respond to an invalid message size.

Reported-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable@kernel.org
Tested-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/rndis.c