]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 Nov 2022 14:10:38 +0000 (15:10 +0100)
commit2faac205ced9c2b63494c689eea2cc6dca874c8c
tree062a649e8cc4cb8ee8e1ebd29f121cb6872da0ae
parent83fe2ae91da779678af2057d0fc39719b2c53ff2
HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report

BugLink: https://bugs.launchpad.net/bugs/1991831
commit cd11d1a6114bd4bc6450ae59f6e110ec47362126 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: c164d6abf3841 ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/hid/hid-steam.c