summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-multitouch.c
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2022-01-19 01:38:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-27 13:02:47 +0300
commit8877331177deabbb1561a43ec5c2d94c3c68766d (patch)
treebf4525be68ef5ef99d43f85c78e8b7e3e7314e2a /drivers/hid/hid-multitouch.c
parentc965ad71a05d5f3b44dcd11213682705666ba9e0 (diff)
downloadlinux-8877331177deabbb1561a43ec5c2d94c3c68766d.tar.xz
HID: wacom: Avoid using stale array indicies to read contact count
commit 20f3cf5f860f9f267a6a6e5642d3d0525edb1814 upstream. If we ever see a touch report with contact count data we initialize several variables used to read the contact count in the pre-report phase. These variables are never reset if we process a report which doesn't contain a contact count, however. This can cause the pre- report function to trigger a read of arbitrary memory (e.g. NULL if we're lucky) and potentially crash the driver. This commit restores resetting of the variables back to default "none" values that were used prior to the commit mentioned below. Link: https://github.com/linuxwacom/input-wacom/issues/276 Fixes: 003f50ab673c (HID: wacom: Update last_slot_field during pre_report phase) CC: stable@vger.kernel.org Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hid/hid-multitouch.c')
0 files changed, 0 insertions, 0 deletions