]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 24 Jul 2025 06:53:18 +0000 (08:53 +0200)
commiteda5e38cc4dd2dcb422840540374910ef2818494
tree74cb75472466f8a2068ba54dec6b4486dcdd8854
parentc18726607c8aa7889c46ba9383df178963a70273
hwmon: (corsair-cpro) Validate the size of the received input buffer

[ Upstream commit 495a4f0dce9c8c4478c242209748f1ee9e4d5820 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/corsair-cpro.c