]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:55 +0000 (09:12 +0200)
commit430755b2d79ceb01290837636ca6ee87eae2c862
tree636fc51992e0e7e32c7db1f91378c5d7094f6cc5
parent84afbcade8bcdc63b30b563483b215783cbc7204
Input: gtco - bounds check collection indent level

commit 2a017fd82c5402b3c8df5e3d6e5165d9e6147dc1 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/tablet/gtco.c