Files
linux-stable-mirror/include/uapi/linux
Benjamin Tissoires 5b1c071d5e HID: hidraw: tighten ioctl command parsing
[ Upstream commit 75d5546f60 ]

The handling for variable-length ioctl commands in hidraw_ioctl() is
rather complex and the check for the data direction is incomplete.

Simplify this code by factoring out the various ioctls grouped by dir
and size, and using a switch() statement with the size masked out, to
ensure the rest of the command is correctly matched.

Fixes: 9188e79ec3 ("HID: add phys and name ioctls to hidraw")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-15 12:00:12 +02:00
..
2025-02-17 10:05:04 +01:00
2024-08-20 14:02:22 -04:00
2024-08-28 06:53:58 -07:00
2024-08-28 06:53:58 -07:00
2024-09-04 16:51:11 +02:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2025-08-20 18:30:11 +02:00
2024-09-01 20:26:05 -07:00
2025-04-20 10:15:55 +02:00
2024-08-19 22:36:26 -04:00
2024-09-06 08:31:40 -06:00
2024-09-11 20:44:32 -07:00