Input: synaptics - avoid using uninitialized variable when probing
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 17 Oct 2018 00:07:35 +0000 (17:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Dec 2018 08:37:27 +0000 (09:37 +0100)
commit9891b528f91d57027c1ce7d9f8165f781c1b532c
tree2d1cbe5eff468eb5eaa145a6af940c2ad36f35e0
parent3962e78a9fcb881d3865eba7faf51536e062ccf8
Input: synaptics - avoid using uninitialized variable when probing

commit f39f8688888ae74fa8deae2d01289b69b4727394 upstream.

synaptics_detect() does not check whether sending commands to the
device succeeds and instead relies on getting unique data from the
device. Let's make sure we seed entire buffer with zeroes to make sure
we will not use garbage on stack that just happen to be 0x47.

Reported-by: syzbot+13cb3b01d0784e4ffc3f@syzkaller.appspotmail.com
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/mouse/synaptics.c