From: Dmitry Torokhov Date: Mon, 23 Oct 2017 23:46:00 +0000 (-0700) Subject: Input: gtco - fix potential out-of-bound access X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2de544fd1b16f76f8dd1213d585ce611155ccd34;p=pandora-kernel.git Input: gtco - fix potential out-of-bound access commit a50829479f58416a013a4ccca791336af3c584c7 upstream. parse_hid_report_descriptor() has a while (i < length) loop, which only guarantees that there's at least 1 byte in the buffer, but the loop body can read multiple bytes which causes out-of-bounds access. Reported-by: Andrey Konovalov Reviewed-by: Andrey Konovalov Signed-off-by: Dmitry Torokhov [bwh: Backported to 3.2: use &device->usbdev->dev as the device for dev_err()] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed