]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (corsair-cpro) Validate the size of the received input buffer
authorMarius Zachmann <mail@mariuszachmann.de>
Thu, 19 Jun 2025 13:27:47 +0000 (15:27 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 15 Jul 2025 17:36:35 +0000 (10:36 -0700)
commit495a4f0dce9c8c4478c242209748f1ee9e4d5820
tree6ba63730e296c65db1dce9d2be731572ad74c5de
parent347e9f5043c89695b01e66b3ed111755afcf1911
hwmon: (corsair-cpro) Validate the size of the received input buffer

Add buffer_recv_size to store the size of the received bytes.
Validate buffer_recv_size in send_usb_cmd().

Reported-by: syzbot+3bbbade4e1a7ab45ca3b@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-hwmon/61233ba1-e5ad-4d7a-ba31-3b5d0adcffcc@roeck-us.net
Fixes: 40c3a4454225 ("hwmon: add Corsair Commander Pro driver")
Signed-off-by: Marius Zachmann <mail@mariuszachmann.de>
Link: https://lore.kernel.org/r/20250619132817.39764-5-mail@mariuszachmann.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/corsair-cpro.c