Bug 2373502 (CVE-2022-50131) - CVE-2022-50131 kernel: HID: mcp2221: prevent a buffer overflow in mcp_smbus_write()
Summary: CVE-2022-50131 kernel: HID: mcp2221: prevent a buffer overflow in mcp_smbus_w...
Keywords:
Status: NEW
Alias: CVE-2022-50131
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-18 12:05 UTC by OSIDB Bzimport
Modified: 2025-08-16 14:13 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-06-18 12:05:49 UTC
In the Linux kernel, the following vulnerability has been resolved:

HID: mcp2221: prevent a buffer overflow in mcp_smbus_write()

Smatch Warning:
drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy()
'&mcp->txbuf[5]' too small (59 vs 255)
drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() 'buf'
too small (34 vs 255)

The 'len' variable can take a value between 0-255 as it can come from
data->block[0] and it is user data. So add an bound check to prevent a
buffer overflow in memcpy().

Comment 1 Avinash Hanwate 2025-06-19 21:26:06 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025061815-CVE-2022-50131-4df3@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.