[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250726204144.107432-1-contact@arnaud-lcm.com>
Date: Sat, 26 Jul 2025 21:41:44 +0100
From: Arnaud Lecomte <contact@...aud-lcm.com>
To: syzbot+52c1a7d3e5b361ccd346@...kaller.appspotmail.com
Cc: linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: syztest
#syz test
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -814,6 +814,10 @@ static int mcp2221_raw_event(struct hid_device *hdev,
}
if (data[2] == MCP2221_I2C_READ_COMPL ||
data[2] == MCP2221_I2C_READ_PARTIAL) {
+ if (!mcp->rxbuf || mcp->rxbuf_idx < 0 || data[3] > 60) {
+ mcp->status = -EINVAL;
+ break;
+ }
buf = mcp->rxbuf;
memcpy(&buf[mcp->rxbuf_idx], &data[4], data[3]);
mcp->rxbuf_idx = mcp->rxbuf_idx + data[3];
--
Powered by blists - more mailing lists