lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251103182543.42451-2-atharvd440@gmail.com>
Date: Mon,  3 Nov 2025 23:55:44 +0530
From: Atharv Dubey <atharvd440@...il.com>
To: jikos@...nel.org
Cc: bentiss@...nel.org,
	linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Atharv Dubey <atharvd440@...il.com>,
	syzbot+1018672fe70298606e5f@...kaller.appspotmail.com
Subject: [PATCH] HID: mcp2221: fix slab out-of-bounds in mcp2221_raw_event

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@...kaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=1018672fe70298606e5f
Signed-off-by: Atharv Dubey <atharvd440@...il.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ