]> 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:58:36 +0000 (08:58 +0200)
commit2771d2ee3d95700f34e1e4df6a445c90565cd4e9
tree30bd8cbed64f15825df3603054b546ea84b1ed3b
parent7e97af172dfc1cb4f5649881d5aef0214eeb78d5
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