]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
USB: gadget: validate interface OS descriptor requests
authorSzymon Heidrich <szymon.heidrich@gmail.com>
Mon, 24 Jan 2022 11:14:00 +0000 (12:14 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 14 Apr 2022 09:32:08 +0000 (11:32 +0200)
commitb952cca2ada39ae19fb0b586fe64f8adb08dcf61
tree9a86dafafdca26ea86f70f99b56fb7e160f8c946
parentb3f0a6c651346fee82b20f44a0fae92b30186b79
USB: gadget: validate interface OS descriptor requests

BugLink: https://bugs.launchpad.net/bugs/1966118
commit 75e5b4849b81e19e9efe1654b30d7f3151c33c2c upstream.

Stall the control endpoint in case provided index exceeds array size of
MAX_CONFIG_INTERFACES or when the retrieved function pointer is null.

Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/usb/gadget/composite.c