linux/tools
Trung Nguyen b6eb022890 selftests/hid: multitouch: test a large ContactCountMaximum
Add a regression test for the out-of-bounds bit operations on
struct mt_device.mt_io_flags.

A HID multitouch device can advertise a ContactCountMaximum far larger
than the number of contacts a single report describes, up to 255. The
driver used to keep the per-slot active state in the bits of a single
unsigned long and index set_bit()/clear_bit() by the slot number, so such
a device drove those operations out of bounds. The sticky-fingers release
timer made it fatal: mt_release_contacts() cleared one bit per slot and
overwrote the adjacent members of struct mt_device.

The new device advertises a ContactCountMaximum of 250 while exposing only
a few finger collections (a large contact count cannot be expressed with
one finger collection per contact within the HID descriptor size limit).
The test sends a single contact and lets the 100ms sticky-fingers timer
release it. A kernel without the fix panics in mt_release_contacts(); a
fixed kernel reports the release cleanly.

Signed-off-by: Trung Nguyen <trungnh@cystack.net>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2026-07-01 20:36:12 +02:00
..
accounting tools/accounting: handle truncated taskstats netlink messages 2026-04-15 02:15:02 -07:00
arch x86/cpu updates for v7.2: 2026-06-15 15:25:17 +05:30
bootconfig Bootconfig updates for v7.2 2026-06-16 17:29:24 +05:30
bpf tools/bpf: build: Append extra cflags 2026-06-14 17:32:53 -07:00
build libbpf: Add __NR_bpf definition for LoongArch 2026-05-28 14:38:15 -07:00
certs
cgroup
counter
crypto
debugging
dma
docs
firewire
firmware
gpio
hv tools: hv: Fix cross-compilation 2026-04-14 04:43:26 +00:00
iio
include bpf-next-7.2 2026-06-17 09:18:14 +01:00
kvm/kvm_stat
laptop
leds
lib bpf-next-7.2 2026-06-17 09:18:14 +01:00
memory-model
mm tools/mm/slabinfo: remove redundant slab->partial assignment 2026-05-29 11:49:16 +02:00
net tools: ynl: try to avoid the very slow YAML loader 2026-06-04 15:36:12 -07:00
objtool objtool/klp: Cache dont_correlate() result 2026-05-04 21:16:07 -07:00
pcmcia
perf This update includes the following changes: 2026-06-16 09:01:23 +05:30
power Power management updates for 7.2-rc1 2026-06-15 11:37:18 +05:30
rcu
sched
sched_ext sched_ext: Changes for v7.2 2026-06-17 12:10:11 +01:00
scripts Kbuild/Kconfig updates for 7.1 2026-04-14 09:18:40 -07:00
sound
spi
testing selftests/hid: multitouch: test a large ContactCountMaximum 2026-07-01 20:36:12 +02:00
thermal
time
tracing rtla: Fix parsing of multi-character short options 2026-06-04 10:53:25 +02:00
unittests docs: kernel-doc: python: strip __counted_by_ptr macro 2026-05-15 08:11:36 -06:00
usb usbip: tools: add hint when no exported devices are found 2026-04-11 12:02:00 +02:00
verification verification/rvgen: Fix ltl2k writing True as a literal 2026-06-04 16:44:25 +02:00
virtio tools/virtio: fix build for kmalloc_obj API and missing stubs 2026-06-10 02:16:59 -04:00
wmi
workqueue
writeback
Makefile