* [PATCH] HID: mcp2221: fix slab out-of-bounds in mcp2221_raw_event
@ 2025-11-03 18:25 Atharv Dubey
2025-11-18 17:03 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: Atharv Dubey @ 2025-11-03 18:25 UTC (permalink / raw)
To: jikos
Cc: bentiss, linux-input, linux-kernel, Atharv Dubey,
syzbot+1018672fe70298606e5f
Fixes an out-of-bounds read triggered by malformed HID input reports.
Fixes: 3a8660878839 ("HID: mcp2221: add support for MCP2221 HID adapter")
Reported-by: syzbot+1018672fe70298606e5f@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=1018672fe70298606e5f
Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
---
drivers/hid/hid-mcp2221.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
index a9fd7648515d..c97f0acbac8b 100644
--- a/drivers/hid/hid-mcp2221.c
+++ b/drivers/hid/hid-mcp2221.c
@@ -945,7 +945,7 @@ static int mcp2221_raw_event(struct hid_device *hdev,
switch (data[1]) {
case MCP2221_SUCCESS:
if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
- (mcp->gp_idx > 0 &&data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
+ (mcp->gp_idx > 0 && data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
mcp->status = -ENOENT;
} else {
mcp->status = 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] HID: mcp2221: fix slab out-of-bounds in mcp2221_raw_event
2025-11-03 18:25 [PATCH] HID: mcp2221: fix slab out-of-bounds in mcp2221_raw_event Atharv Dubey
@ 2025-11-18 17:03 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2025-11-18 17:03 UTC (permalink / raw)
To: Atharv Dubey
Cc: bentiss, linux-input, linux-kernel, syzbot+1018672fe70298606e5f
On Mon, 3 Nov 2025, Atharv Dubey wrote:
> Fixes an out-of-bounds read triggered by malformed HID input reports.
>
> Fixes: 3a8660878839 ("HID: mcp2221: add support for MCP2221 HID adapter")
The commit hash and the commit name don't match.
3a8660878839 is a Makefile update to reflect new kernel version, and
commit with shortlog "HID: mcp2221: add support for MCP2221 HID adapter"
doesn't seem to exist ...
> Reported-by: syzbot+1018672fe70298606e5f@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=1018672fe70298606e5f
> Signed-off-by: Atharv Dubey <atharvd440@gmail.com>
> ---
> drivers/hid/hid-mcp2221.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-mcp2221.c b/drivers/hid/hid-mcp2221.c
> index a9fd7648515d..c97f0acbac8b 100644
> --- a/drivers/hid/hid-mcp2221.c
> +++ b/drivers/hid/hid-mcp2221.c
> @@ -945,7 +945,7 @@ static int mcp2221_raw_event(struct hid_device *hdev,
> switch (data[1]) {
> case MCP2221_SUCCESS:
> if ((data[mcp->gp_idx] == MCP2221_ALT_F_NOT_GPIOV) ||
> - (mcp->gp_idx > 0 &&data[mcp->gp_idx - 1] == MCP2221_ALT_F_NOT_GPIOV)) {
... nor does this code.
What tree is this patch against?
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-18 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-03 18:25 [PATCH] HID: mcp2221: fix slab out-of-bounds in mcp2221_raw_event Atharv Dubey
2025-11-18 17:03 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox