HID: steam: Prevent NULL pointer dereference in steam_{recv,send}_report
stable inclusion from stable-v5.10.141 commit dc815761948ab5b8c94db6cb53c95103588f16ae category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I685FC Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dc815761948ab5b8c94db6cb53c95103588f16ae -------------------------------- commit cd11d1a6 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: c164d6ab ("HID: add driver for Valve Steam Controller") Signed-off-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com> Reviewed-by: NZheng Zengkai <zhengzengkai@huawei.com> (cherry picked from commit c9d1231b)
Showing
想要评论请 注册 或 登录