]> git.hungrycats.org Git - linux/commit
HID: elo: reject short touchscreen reports
authorJiale Yao <yaojiale02@163.com>
Thu, 24 Sep 2026 14:44:07 +0000 (22:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Nov 2026 17:06:10 +0000 (12:06 -0500)
commit6a0a7d6418261e99e74ba7089b08889f1a93eafd
treee24c23e1df5827b96b40f65feb30034a7b75ffaa
parent94d0e789d8b0d2ea8e25ed5ff2fe2648e11f2297
HID: elo: reject short touchscreen reports

commit 1cb92fcb2ac344d78737e3c5cb7b061dfb2850b1 upstream.

The HID core invokes raw_event callbacks before validating the report
length.  elo_raw_event() only checks the first-byte packet marker before
elo_process_data() reads coordinates, flags, and pressure through offset
seven.  A truncated packet beginning with the expected marker can therefore
cause an out-of-bounds read.

Require the complete eight-byte SmartSet packet before parsing it.

Commit 47669bec44fe ("HID: asus: refactor the two workqueues and init
sequence") added the same kind of raw_event length validation to hid-asus.

Fixes: d23efc19478a ("HID: add driver for ELO 4000/4500")
Cc: stable@vger.kernel.org
Signed-off-by: Jiale Yao <yaojiale02@163.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-elo.c