]> git.baikalelectronics.ru Git - kernel.git/commit
Input: gtco - bounds check collection indent level
authorGrant Hernandez <granthernandez@google.com>
Sat, 13 Jul 2019 08:00:12 +0000 (01:00 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 13 Jul 2019 08:43:10 +0000 (01:43 -0700)
commitabf7128523aabe80292d1ae7450227e1ed54626f
tree0659ec983ee48263d7cc8add14bba9343ce16dbf
parentcfa2e464118bcf1b37ff899cf5eaf77035e9ef41
Input: gtco - bounds check collection indent level

The GTCO tablet input driver configures itself from an HID report sent
via USB during the initial enumeration process. Some debugging messages
are generated during the parsing. A debugging message indentation
counter is not bounds checked, leading to the ability for a specially
crafted HID report to cause '-' and null bytes be written past the end
of the indentation array. As long as the kernel has CONFIG_DYNAMIC_DEBUG
enabled, this code will not be optimized out.  This was discovered
during code review after a previous syzkaller bug was found in this
driver.

Signed-off-by: Grant Hernandez <granthernandez@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/tablet/gtco.c