History log of /linux-master/drivers/hid/hid-holtekff.c
Revision Date Author Comments
# d9d4b1e4 03-Oct-2019 Alan Stern <stern@rowland.harvard.edu>

HID: Fix assumption that devices have inputs

The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the
assumption.

The same assumption is present in over a dozen other HID drivers.
This patch fixes them by checking that the list of hid_inputs for the
hid_device is nonempty before allowing it to be used.

Reported-and-tested-by: syzbot+403741a091bf41d4ae79@syzkaller.appspotmail.com
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: <stable@vger.kernel.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>


# 1a59d1b8 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 56075f60 25-Nov-2017 Daniel Axtens <dja@axtens.net>

HID: holtekff: move MODULE_* parameters out of #ifdef block

If you compile with:
CONFIG_HID_HOLTEK=m
CONFIG_HOLTEK_FF is not set

You get the following warning:
WARNING: modpost: missing MODULE_LICENSE() in drivers/hid/hid-holtekff.o
see include/linux/module.h for more information

Fix this by moving the module info out of the #ifdef CONFIG_HOLTEK_FF
block and into the un-guarded part of the file.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Acked-by: Anssi Hannula <anssi.hannula@iki.fi>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 9854a6f9 02-Aug-2013 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

HID: hid-holtekff: don't push static constants on stack for %*ph

There is no need to pass constants via stack. The width may be explicitly
specified in the format.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# d8814272 25-Feb-2013 Benjamin Tissoires <benjamin.tissoires@gmail.com>

HID: use hid_hw_request() instead of direct call to usbhid

This allows the hid drivers to be independent from the transport layer.

The patch was constructed by replacing all occurences of
usbhid_submit_report() by its hid_hw_request() counterpart.
Then, drivers not requiring USB_HID anymore have their USB_HID
dependency cleaned in the Kconfig file.

Finally, few drivers still depends on USB_HID. Many of them
are requiring the io wait callback. They are found in the next patch.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

For the sensor-hub part:
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# f425458e 17-Dec-2012 H Hartley Sweeten <hartleys@visionengravers.com>

HID: Use module_hid_driver macro

Use the new module_hid_driver macro in all HID drivers that have
a simple register/unregister init/exit.

This also converts the hid drivers that test for a failure of
hid_register_driver() and report the failure. Using module_hid_driver
in those drivers removes the failure message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# e2e78e71 05-Sep-2012 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

HID: holtekff: use %*ph to dump small buffers

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 8f86a2c3 03-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com>

hid: Add module.h to fix up implicit users of it

A pending cleanup will mean that module.h won't be implicitly
everywhere anymore. Make sure the modular drivers in clocksource
are actually calling out for <module.h> explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>


# d946e65e 26-Jun-2011 Anssi Hannula <anssi.hannula@iki.fi>

HID: add FF support for Holtek On Line Grip based gamepads

Add force feedback support for Holtek On Line Grip based HID devices.

The protocol is more complex than that of most other rumblepads, but the
device still needs to be handled as a memoryless one.

Tested by Cleber de Mattos Casali with a 1241:5015 "Clone Joypad Super
Power Fire" gamepad, with help from Hendrik Iben <hendrik_iben@web.de>.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Tested-by: Cleber de Mattos Casali <clebercasali@yahoo.com.br>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>