<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/hid/hid-multitouch.c, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-07-01T18:36:12+00:00</updated>
<entry>
<title>HID: multitouch: fix out-of-bounds bit access on mt_io_flags</title>
<updated>2026-07-01T18:36:12+00:00</updated>
<author>
<name>Trung Nguyen</name>
<email>trungnh@cystack.net</email>
</author>
<published>2026-07-01T17:13:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8813b0612275cc61fe9e6603d0ee019247ade6be'/>
<id>urn:sha1:8813b0612275cc61fe9e6603d0ee019247ade6be</id>
<content type='text'>
mt_io_flags is a single unsigned long, but mt_process_slot(),
mt_release_pending_palms() and mt_release_contacts() use it as a
per-slot bitmap indexed by the slot number. That slot number is only
bounded by td-&gt;maxcontacts, which is taken from the device's
ContactCountMaximum feature report and can be up to 255, not by
BITS_PER_LONG.

As a result, a multitouch device that advertises a large contact count
makes set_bit()/clear_bit() operate past the mt_io_flags word and
corrupt the adjacent members of struct mt_device. The sticky-fingers
release timer is the easiest way to reach this. mt_release_contacts()
runs

	for (i = 0; i &lt; mt-&gt;num_slots; i++)
		clear_bit(i, &amp;td-&gt;mt_io_flags);

with num_slots == maxcontacts. For maxcontacts around 250 the loop
clears the bits that overlap td-&gt;applications.next, zeroing that list
head, and the list_for_each_entry() that immediately follows then
dereferences NULL. The kernel panics from timer (softirq) context. On a
KASAN build this shows up as a general protection fault in
mt_release_contacts() with a null-ptr-deref at offset 0x58, which is
offsetof(struct mt_application, num_received).

The state is reachable from an untrusted USB or Bluetooth HID
multitouch device; no local privileges are required.

Store the per-slot active state in a separately allocated bitmap sized
for maxcontacts, the same pattern already used for pending_palm_slots,
and keep only MT_IO_FLAGS_RUNNING in mt_io_flags. The two
"mt_io_flags &amp; MT_IO_SLOTS_MASK" arming checks become
bitmap_empty(td-&gt;active_slots, td-&gt;maxcontacts).

Move MT_IO_FLAGS_RUNNING back to bit 0. It was bumped to bit 32 by the
same commit to leave the low byte for the slot bits; with the slot bits
gone it fits in bit 0 again, which also keeps it within the unsigned
long on 32-bit.

Fixes: 46f781e0d151 ("HID: multitouch: fix sticky fingers")
Cc: stable@vger.kernel.org
Signed-off-by: Trung Nguyen &lt;trungnh@cystack.net&gt;
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-7.2/multitouch' into for-linus</title>
<updated>2026-06-16T19:52:21+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.com</email>
</author>
<published>2026-06-16T19:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=df1d6781b254e0940082d4e544e9815121850bea'/>
<id>urn:sha1:df1d6781b254e0940082d4e544e9815121850bea</id>
<content type='text'>
- UX improvement fixes for Yoga Book 9 (Dave Carey)
</content>
</entry>
<entry>
<title>HID: multitouch: Honor ContactCount for Yoga Book 9 to suppress ghost contacts</title>
<updated>2026-06-10T16:28:19+00:00</updated>
<author>
<name>Dave Carey</name>
<email>carvsdriver@gmail.com</email>
</author>
<published>2026-05-14T19:32:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ef257b8be9776915ca468bae6c91e31757e69734'/>
<id>urn:sha1:ef257b8be9776915ca468bae6c91e31757e69734</id>
<content type='text'>
The INGENIC 17EF:6161 firmware on the Lenovo Yoga Book 9 14IAH10
does not clear stale contact slots when fingers are lifted.  Each
HID report contains up to 10 finger slots, but only the first
ContactCount slots represent valid contacts; the remaining slots
retain TipSwitch=1 with positions from previous touches.

Raw HID capture confirms this: across a 60-second capture with
repeated multi-finger gestures, 90% of frames had more TipSwitch=1
slots than the reported ContactCount.  The ContactCount field itself
is always accurate.

Add MT_QUIRK_CONTACT_CNT_ACCURATE to the MT_CLS_YOGABOOK9I class so
the driver stops processing slots once ContactCount valid contacts
have been consumed, discarding the stale ghost entries per HID
specification section 17.  MT_QUIRK_NOT_SEEN_MEANS_UP (already in
the class) ensures that any slot skipped by this guard is released
via INPUT_MT_DROP_UNUSED at frame sync.

Signed-off-by: Dave Carey &lt;carvsdriver@gmail.com&gt;
Tested-by: Dave Carey &lt;carvsdriver@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: pass the buffer size to hid_report_raw_event</title>
<updated>2026-05-12T16:03:37+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2026-05-04T08:47:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=2c85c61d1332e1e16f020d76951baf167dcb6f7a'/>
<id>urn:sha1:2c85c61d1332e1e16f020d76951baf167dcb6f7a</id>
<content type='text'>
commit 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing
bogus memset()") enforced the provided data to be at least the size of
the declared buffer in the report descriptor to prevent a buffer
overflow. However, we can try to be smarter by providing both the buffer
size and the data size, meaning that hid_report_raw_event() can make
better decision whether we should plaining reject the buffer (buffer
overflow attempt) or if we can safely memset it to 0 and pass it to the
rest of the stack.

Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()")
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
Acked-by: Johan Hovold &lt;johan@kernel.org&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: multitouch: Fix Yoga Book 9 14IAH10 touchscreen misclassification</title>
<updated>2026-05-12T15:39:26+00:00</updated>
<author>
<name>Dave Carey</name>
<email>carvsdriver@gmail.com</email>
</author>
<published>2026-04-13T12:58:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f1bd44b9b62c6fbdaacdd5d115ebe3fe543fcfa1'/>
<id>urn:sha1:f1bd44b9b62c6fbdaacdd5d115ebe3fe543fcfa1</id>
<content type='text'>
The Lenovo Yoga Book 9 14IAH10 (83KJ) (17EF:6161) firmware includes a
HID_DG_TOUCHPAD application collection designed for the Windows inbox HID
driver's Win8 PTP touchpad mode.  On Linux the HID_DG_TOUCHSCREEN
collections provide the correct direct-touch interface.  The presence of
the touchpad collection causes hid-multitouch to misclassify the
touchscreen nodes as indirect buttonpads, leaving them non-functional.

Within the touchpad collection:
- HID_UP_BUTTON usages trigger the touchscreen-with-buttons heuristic
  that sets INPUT_MT_POINTER on the touchscreen applications.
- The HID_DG_TOUCHPAD application itself sets INPUT_MT_POINTER via
  mt_allocate_application(), propagating to all touchscreen nodes.
- A HID_DG_BUTTONTYPE feature (report 0x51) returns MT_BUTTONTYPE_CLICKPAD,
  setting td-&gt;is_buttonpad = true for the entire device.

Additionally, the firmware resets if any USB control request arrives while
the CDC-ACM interface is initialising (~1.18 s after enumeration).
The Win8 compliance blob (0xff00:0xc5) and Contact Count Max feature
reports in the touchscreen collections trigger GET_REPORT calls at probe
that hit this window.  Surface Switch (0x57) and Button Switch (0x58)
feature reports are sent by mt_set_modes() on every input-device open and
close, repeatedly hitting this window throughout device lifetime.

The firmware also leaves a persistent ghost contact in its contact buffer
(contact ID 2, fixed coordinates, tip always asserted) on every enumeration.
This ghost occupies a multitouch slot and prevents KWin from seeing a clean
finger-lift, causing stuck touch state.  The ghost is cleared when Input
Mode is set via HID_REQ_SET_REPORT at probe.

Fix using a report descriptor fixup in mt_report_fixup() and a class
definition update:

1. Remove the entire HID_DG_TOUCHPAD application collection.  Parsing
   HID short items from its header to the matching End Collection and
   closing the gap with memmove eliminates all three BUTTONPAD
   heuristics and the feature reports within the collection.

2. Neutralize the Win8 compliance blob feature reports remaining in the
   touchscreen collections by changing Usage Page 0xff00 to 0x0f00,
   preventing the case 0xff0000c5 branch in mt_feature_mapping() from
   issuing GET_REPORT.

3. Neutralize the Contact Count Max feature reports by changing usage
   0x55 to 0x00; set maxcontacts = 10 in the class definition so the
   driver uses the correct contact limit without querying the device.

4. Neutralize Surface Switch (0x57) and Button Switch (0x58) feature
   report usages in the Device Configuration collection so mt_set_modes()
   does not issue HID_REQ_SET_REPORT for these on every input-device
   open/close.  Input Mode (0x52) is intentionally left intact: the single
   HID_REQ_SET_REPORT at probe flushes the firmware's contact buffer and
   clears the persistent ghost contact.  By probe time the cdc-acm driver
   has already satisfied the CDC-ACM init watchdog (~130 ms), so this
   request arrives safely after the reset window has closed.

5. Add MT_QUIRK_NOT_SEEN_MEANS_UP to the MT_CLS_YOGABOOK9I class so that
   contacts not present in a frame are released via INPUT_MT_DROP_UNUSED,
   preventing stale multitouch slots from lingering if the firmware omits
   a contact from a report.

Signed-off-by: Dave Carey &lt;carvsdriver@gmail.com&gt;
Tested-by: Dave Carey &lt;carvsdriver@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: multitouch: Check to ensure report responses match the request</title>
<updated>2026-03-17T10:36:16+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee@kernel.org</email>
</author>
<published>2026-02-27T16:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e716edafedad4952fe3a4a273d2e039a84e8681a'/>
<id>urn:sha1:e716edafedad4952fe3a4a273d2e039a84e8681a</id>
<content type='text'>
It is possible for a malicious (or clumsy) device to respond to a
specific report's feature request using a completely different report
ID.  This can cause confusion in the HID core resulting in nasty
side-effects such as OOB writes.

Add a check to ensure that the report ID in the response, matches the
one that was requested.  If it doesn't, omit reporting the raw event and
return early.

Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: multitouch: Keep latency normal on deactivate for reactivation gesture</title>
<updated>2026-02-26T16:10:22+00:00</updated>
<author>
<name>Werner Sembach</name>
<email>wse@tuxedocomputers.com</email>
</author>
<published>2026-01-08T16:09:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ec3070f01fa30f2c5547d645dbb76174304bf0e4'/>
<id>urn:sha1:ec3070f01fa30f2c5547d645dbb76174304bf0e4</id>
<content type='text'>
Uniwill devices have a built in gesture in the touchpad to de- and
reactivate it by double taping the upper left corner. This gesture stops
working when latency is set to high, so this patch keeps the latency on
normal.

Cc: stable@vger.kernel.org
Signed-off-by: Werner Sembach &lt;wse@tuxedocomputers.com&gt;
[jkosina@suse.com: change bit from 24 to 25]
[jkosina@suse.com: update shortlog]
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: multitouch: new class MT_CLS_EGALAX_P80H84</title>
<updated>2026-02-24T08:41:21+00:00</updated>
<author>
<name>Ian Ray</name>
<email>ian.ray@gehealthcare.com</email>
</author>
<published>2026-02-17T11:51:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a2e70a89fa58133521b2deae4427d35776bda935'/>
<id>urn:sha1:a2e70a89fa58133521b2deae4427d35776bda935</id>
<content type='text'>
Fixes: f9e82295eec1 ("HID: multitouch: add eGalaxTouch P80H84 support")
Signed-off-by: Ian Ray &lt;ian.ray@gehealthcare.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: multitouch: add eGalaxTouch EXC3188 support</title>
<updated>2026-01-23T12:54:21+00:00</updated>
<author>
<name>Thorsten Schmelzer</name>
<email>tschmelzer@topcon.com</email>
</author>
<published>2026-01-23T08:57:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8e4ac86b2ddd36fe501e20ecfcc080e536df1f48'/>
<id>urn:sha1:8e4ac86b2ddd36fe501e20ecfcc080e536df1f48</id>
<content type='text'>
Add support for the for the EXC3188 touchscreen from eGalaxy.

Signed-off-by: Thorsten Schmelzer &lt;tschmelzer@topcon.com&gt;
Signed-off-by: Michael Tretter &lt;m.tretter@pengutronix.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
<entry>
<title>HID: multitouch: add quirks for Lenovo Yoga Book 9i</title>
<updated>2026-01-10T09:04:59+00:00</updated>
<author>
<name>Brian Howard</name>
<email>blhoward2@gmail.com</email>
</author>
<published>2025-12-03T02:35:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=822bc5b3744b0b2c2c9678aa1d80b2cf04fdfabf'/>
<id>urn:sha1:822bc5b3744b0b2c2c9678aa1d80b2cf04fdfabf</id>
<content type='text'>
The Lenovo Yoga Book 9i is a dual-screen laptop, with a single composite
USB device providing both touch and tablet interfaces for both screens.
All inputs report through a single device, differentiated solely by report
numbers. As there is no way for udev to differentiate the inputs based on
USB vendor/product ID or interface numbers, custom naming is required to
match against for downstream configuration. A firmware bug also results
in an erroneous InRange message report being received after the stylus
leaves proximity, blocking later touch events. Add required quirks for
Gen 8 to Gen 10 models, including a new quirk providing for custom input
device naming and dropping erroneous InRange reports.

Signed-off-by: Brian Howard &lt;blhoward2@gmail.com&gt;
Tested-by: Brian Howard &lt;blhoward2@gmail.com&gt;
Tested-by: Kris Fredrick &lt;linux.baguette800@slmail.me&gt;
Reported-by: Andrei Shumailov &lt;gentoo1993@gmail.com&gt;
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220386
Signed-off-by: Jiri Kosina &lt;jkosina@suse.com&gt;
</content>
</entry>
</feed>
