]> git.baikalelectronics.ru Git - kernel.git/commit
HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report
authorLee Jones <lee.jones@linaro.org>
Fri, 8 Jul 2022 07:40:09 +0000 (08:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:27:45 +0000 (10:27 +0200)
commitaf1870d7ef2c304c1031f8244c736c0c272dfc8d
treeb39b819af8c1bf0ae1a78a6b4a395942ad110911
parent4a15fabcef0d9e83384eb862a4bbae4378bafccd
HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report

commit b50a25ce577f9d9c7a82388388543caa30a9a719 upstream.

It is possible for a malicious device to forgo submitting a Feature
Report.  The HID Steam driver presently makes no prevision for this
and de-references the 'struct hid_report' pointer obtained from the
HID devices without first checking its validity.  Let's change that.

Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
Fixes: dbd9ea6f132d9 ("HID: add driver for Valve Steam Controller")
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-steam.c