]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 19 Oct 2018 17:40:12 +0000 (10:40 -0700)
commit182535b6fc87414f1f7f9f42de7aa070c436effd
tree845038a024908852df633f70f6f0cc1d04ece2f9
parent91076d54979a5651d91a8bad5e67c0980856a1f0
Input: synaptics - avoid using uninitialized variable when probing

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>
drivers/input/mouse/synaptics.c