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
..
2024-09-26 17:14:35 +02:00
2025-02-17 10:05:04 +01:00
2024-09-11 11:23:56 +02:00
2024-08-22 17:25:59 +08:00
2024-08-20 14:02:22 -04:00
2024-08-30 08:22:36 +02:00
2024-08-28 06:53:58 -07:00
2024-09-11 10:45:28 -06:00
2025-06-27 11:11:40 +01:00
2024-08-28 06:53:58 -07:00
2024-08-26 19:21:14 -07:00
2024-09-17 14:46:17 +02:00
2024-08-26 09:33:58 -07:00
2024-08-23 13:04:34 +01:00
2024-09-18 07:40:56 +09:00
2024-08-28 16:53:57 +02:00
2024-12-14 20:03:48 +01:00
2024-09-05 11:39:17 +02:00
2024-09-13 21:15:44 -07:00
2024-09-04 16:51:11 +02:00
2025-10-15 12:00:12 +02:00
2024-12-09 10:40:56 +01:00
2024-08-26 09:37:22 -07:00
2025-08-20 18:30:39 +02:00
2024-09-04 16:40:33 -07:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2025-02-17 10:04:55 +01:00
2025-08-20 18:30:11 +02:00
2024-08-22 10:45:12 +02:00
2025-05-29 11:02:04 +02:00
2024-09-01 20:26:05 -07:00
2025-04-20 10:15:24 +02:00
2025-04-20 10:15:55 +02:00
2024-09-12 20:28:46 -07:00
2024-08-19 22:36:26 -04:00
2024-09-11 20:53:43 -07:00
2025-09-25 11:13:50 +02:00
2025-09-25 11:13:50 +02:00
2024-09-06 08:31:40 -06:00
2024-09-10 16:55:23 -07:00
2024-09-11 20:44:32 -07:00
2025-05-29 11:02:23 +02:00
2024-09-16 11:15:26 +02:00
2025-08-20 18:30:57 +02:00
2025-04-20 10:15:10 +02:00
2025-08-28 16:31:03 +02:00
2024-08-14 20:37:47 -07:00
2025-04-20 10:15:52 +02:00
2024-09-08 18:40:33 +01:00
2025-04-20 10:15:32 +02:00
2024-12-05 14:01:53 +01:00
2024-09-05 20:11:43 +02:00
2024-08-20 11:38:23 +02:00
2025-01-02 10:34:16 +01:00
2025-05-18 08:24:56 +02:00
2024-10-16 08:08:18 -06:00
2024-09-11 20:44:32 -07:00
2024-08-22 16:56:24 -07:00
2024-09-10 02:51:48 -04:00
2025-09-04 15:31:43 +02:00
2024-09-05 20:10:34 +02:00
2024-09-10 02:51:48 -04:00
2025-07-06 11:01:40 +02:00
2025-02-08 09:58:00 +01:00