<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/hid, branch master</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=master</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2023-01-18T22:44:32Z</updated>
<entry>
<title>Merge tag 'for-linus-2023011801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid</title>
<updated>2023-01-18T22:44:32Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-01-18T22:44:32Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=7287904c8771b77b9504f53623bb477065c19a58'/>
<id>urn:sha1:7287904c8771b77b9504f53623bb477065c19a58</id>
<content type='text'>
Pull HID fixes from Jiri Kosina:

 - fixes for potential empty list handling in HID core (Pietro Borrello)

 - fix for NULL pointer dereference in betop driver that could be
   triggered by malicious device (Pietro Borrello)

 - fixes for handling calibration data preventing division by zero in
   Playstation driver (Roderick Colenbrander)

 - fix for memory leak on error path in amd-sfh driver (Basavaraj
   Natikar)

 - other few assorted small fixes and device ID-specific handling

* tag 'for-linus-2023011801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
  HID: betop: check shape of output reports
  HID: playstation: sanity check DualSense calibration data.
  HID: playstation: sanity check DualShock4 calibration data.
  HID: uclogic: Add support for XP-PEN Deco 01 V2
  HID: revert CHERRY_MOUSE_000C quirk
  HID: check empty report_list in bigben_probe()
  HID: check empty report_list in hid_validate_values()
  HID: amd_sfh: Fix warning unwind goto
  HID: intel_ish-hid: Add check for ishtp_dma_tx_map
</content>
</entry>
<entry>
<title>HID: betop: check shape of output reports</title>
<updated>2023-01-18T15:34:35Z</updated>
<author>
<name>Pietro Borrello</name>
<email>borrello@diag.uniroma1.it</email>
</author>
<published>2023-01-11T18:12:16Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=3782c0d6edf658b71354a64d60aa7a296188fc90'/>
<id>urn:sha1:3782c0d6edf658b71354a64d60aa7a296188fc90</id>
<content type='text'>
betopff_init() only checks the total sum of the report counts for each
report field to be at least 4, but hid_betopff_play() expects 4 report
fields.
A device advertising an output report with one field and 4 report counts
would pass the check but crash the kernel with a NULL pointer dereference
in hid_betopff_play().

Fixes: 52cd7785f3cd ("HID: betop: add drivers/hid/hid-betopff.c")
Signed-off-by: Pietro Borrello &lt;borrello@diag.uniroma1.it&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: playstation: sanity check DualSense calibration data.</title>
<updated>2023-01-18T09:10:58Z</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2023-01-06T01:59:08Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=ccf1e1626d37745d0a697db67407beec9ae9d4b8'/>
<id>urn:sha1:ccf1e1626d37745d0a697db67407beec9ae9d4b8</id>
<content type='text'>
Make sure calibration values are defined to prevent potential kernel
crashes. This fixes a hypothetical issue for virtual or clone devices
inspired by a similar fix for DS4.

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: playstation: sanity check DualShock4 calibration data.</title>
<updated>2023-01-18T09:10:27Z</updated>
<author>
<name>Roderick Colenbrander</name>
<email>roderick@gaikai.com</email>
</author>
<published>2023-01-06T01:59:07Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=74cb485f68eb3dff6802ee446a602607b03f4fc9'/>
<id>urn:sha1:74cb485f68eb3dff6802ee446a602607b03f4fc9</id>
<content type='text'>
Some DualShock4 devices report invalid calibration data resulting
in kernel oopses due to division by zero during report handling.

The devices affected generally appear to be clone devices, which don't
implement all reports properly and don't populate proper calibration
data. The issue may have been seen on an official device with erased
calibration reports.

This patch prevents the crashes by essentially disabling calibration
when invalid values are detected.

Signed-off-by: Roderick Colenbrander &lt;roderick.colenbrander@sony.com&gt;
Tested-by: Alain Carlucci &lt;alain.carlucci@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: uclogic: Add support for XP-PEN Deco 01 V2</title>
<updated>2023-01-18T08:43:32Z</updated>
<author>
<name>José Expósito</name>
<email>jose.exposito89@gmail.com</email>
</author>
<published>2022-12-26T12:34:56Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=febb2c0d7c69c0396aa32d5ab425a4163473961a'/>
<id>urn:sha1:febb2c0d7c69c0396aa32d5ab425a4163473961a</id>
<content type='text'>
The XP-PEN Deco 01 V2 is a UGEE v2 device with a frame with 8 buttons.
Its pen has 2 buttons, supports tilt and pressure.

Add its ID in order to support the device.

Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/839
Tested-by: Mark Waddoups &lt;mwaddoups@gmail.com&gt;
Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: revert CHERRY_MOUSE_000C quirk</title>
<updated>2023-01-17T14:41:40Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2023-01-17T14:41:40Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=cbf44580ce6b310272a73e3e794233fd064330bd'/>
<id>urn:sha1:cbf44580ce6b310272a73e3e794233fd064330bd</id>
<content type='text'>
This partially reverts commit f6d910a89a2391 ("HID: usbhid: Add ALWAYS_POLL quirk
for some mice"), as it turns out to break reboot on some platforms for reason
yet to be understood.

Fixes: f6d910a89a2391 ("HID: usbhid: Add ALWAYS_POLL quirk for some mice")
Reported-by: Christian Zigotzky &lt;chzigotzky@xenosoft.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: check empty report_list in bigben_probe()</title>
<updated>2023-01-17T12:09:59Z</updated>
<author>
<name>Pietro Borrello</name>
<email>borrello@diag.uniroma1.it</email>
</author>
<published>2023-01-16T11:11:25Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=c7bf714f875531f227f2ef1fdcc8f4d44e7c7d9d'/>
<id>urn:sha1:c7bf714f875531f227f2ef1fdcc8f4d44e7c7d9d</id>
<content type='text'>
Add a check for empty report_list in bigben_probe().
The missing check causes a type confusion when issuing a list_entry()
on an empty report_list.
The problem is caused by the assumption that the device must
have valid report_list. While this will be true for all normal HID
devices, a suitably malicious device can violate the assumption.

Fixes: 256a90ed9e46 ("HID: hid-bigbenff: driver for BigBen Interactive PS3OFMINIPAD gamepad")
Signed-off-by: Pietro Borrello &lt;borrello@diag.uniroma1.it&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: check empty report_list in hid_validate_values()</title>
<updated>2023-01-17T12:09:59Z</updated>
<author>
<name>Pietro Borrello</name>
<email>borrello@diag.uniroma1.it</email>
</author>
<published>2023-01-16T11:11:24Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=b12fece4c64857e5fab4290bf01b2e0317a88456'/>
<id>urn:sha1:b12fece4c64857e5fab4290bf01b2e0317a88456</id>
<content type='text'>
Add a check for empty report_list in hid_validate_values().
The missing check causes a type confusion when issuing a list_entry()
on an empty report_list.
The problem is caused by the assumption that the device must
have valid report_list. While this will be true for all normal HID
devices, a suitably malicious device can violate the assumption.

Fixes: 1b15d2e5b807 ("HID: core: fix validation of report id 0")
Signed-off-by: Pietro Borrello &lt;borrello@diag.uniroma1.it&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: amd_sfh: Fix warning unwind goto</title>
<updated>2023-01-06T15:06:05Z</updated>
<author>
<name>Basavaraj Natikar</name>
<email>Basavaraj.Natikar@amd.com</email>
</author>
<published>2023-01-02T16:30:42Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=2a33ad4a0ba5a527b92aeef9a313aefec197fe28'/>
<id>urn:sha1:2a33ad4a0ba5a527b92aeef9a313aefec197fe28</id>
<content type='text'>
Return directly instead of using existing goto will not cleanup
previously allocated resources. Hence replace return with goto
to fix warning unwind goto which cleanups previously allocated
resources.

Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Basavaraj Natikar &lt;Basavaraj.Natikar@amd.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: intel_ish-hid: Add check for ishtp_dma_tx_map</title>
<updated>2023-01-02T12:50:14Z</updated>
<author>
<name>Jiasheng Jiang</name>
<email>jiasheng@iscas.ac.cn</email>
</author>
<published>2022-11-22T13:48:23Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=b3d40c3ec3dc4ad78017de6c3a38979f57aaaab8'/>
<id>urn:sha1:b3d40c3ec3dc4ad78017de6c3a38979f57aaaab8</id>
<content type='text'>
As the kcalloc may return NULL pointer,
it should be better to check the ishtp_dma_tx_map
before use in order to avoid NULL pointer dereference.

Fixes: 3703f53b99e4 ("HID: intel_ish-hid: ISH Transport layer")
Signed-off-by: Jiasheng Jiang &lt;jiasheng@iscas.ac.cn&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
