]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Input: gtco - fix potential out-of-bound access
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Oct 2017 23:46:00 +0000 (16:46 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 27 Oct 2017 22:14:41 +0000 (15:14 -0700)
commita50829479f58416a013a4ccca791336af3c584c7
tree74da0be0913dcd747df260a8432f2d8d8c708607
parent57a95b41869b8f0d1949c24df2a9dac1ca7082ee
Input: gtco - fix potential out-of-bound access

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 <andreyknvl@google.com>
Reviewed-by: Andrey Konovalov <andreyknvl@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/tablet/gtco.c