summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-04-04 10:04:26 +0200
committerJiri Kosina <jkosina@suse.cz>2021-04-07 12:48:19 +0200
commit34348a8661e3cd67dcf6938f08c8bb77522301f7 (patch)
treef4ba81c52cda35fc90d48b4930d42be7eb28d6c2 /fs
parent658d04e6eb6be1601ae95d7bee92bbf4096cdc1e (diff)
HID: lenovo: Check hid_get_drvdata() returns non NULL in lenovo_event()
The HID lenovo probe function only attaches drvdata to one of the USB interfaces, but lenovo_event() will get called for all USB interfaces to which hid-lenovo is bound. This allows a malicious device to fake being a device handled by hid-lenovo, which generates events for which lenovo_event() has special handling (and thus dereferences hid_get_drvdata()) on another interface triggering a NULL pointer exception. Add a check for hid_get_drvdata() returning NULL, avoiding this possible NULL pointer exception. Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek BehĂșn <kabel@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions