From: Alan Stern Date: Mon, 1 Aug 2016 19:25:56 +0000 (-0400) Subject: USB: validate wMaxPacketValue entries in endpoint descriptors X-Git-Tag: v3.2.84~90 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f121a6c4cba5ab03cddc607a3ceb7897074fb8f2;p=pandora-kernel.git USB: validate wMaxPacketValue entries in endpoint descriptors commit aed9d65ac3278d4febd8665bd7db59ef53e825fe upstream. Erroneous or malicious endpoint descriptors may have non-zero bits in reserved positions, or out-of-bounds values. This patch helps prevent these from causing problems by bounds-checking the wMaxPacketValue entries in endpoint descriptors and capping the values at the maximum allowed. This issue was first discovered and tests were conducted by Jake Lamberson , an intern working for Rosie Hall. Signed-off-by: Alan Stern Reported-by: roswest Tested-by: roswest Signed-off-by: Greg Kroah-Hartman [bwh: Backported to 3.2: drop the USB_SPEED_SUPER_PLUS case] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed