Commit 4fe6f472 authored by Xinyu Liu's avatar Xinyu Liu Committed by Greg Kroah-Hartman
Browse files

usb: core: config: Prevent OOB read in SS endpoint companion parsing



commit cf16f408 upstream.

usb_parse_ss_endpoint_companion() checks descriptor type before length,
enabling a potentially odd read outside of the buffer size.

Fix this up by checking the size first before looking at any of the
fields in the descriptor.

Signed-off-by: default avatarXinyu Liu <katieeliu@tencent.com>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e48df7a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment