CVE-2022-50131 Details
Description
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().
A buffer overflow vulnerability has been identified in the Linux kernel's HID MCP2221 driver, specifically within the 'mcp_smbus_write()' function. The issue arises because the 'len' variable, which can range from 0 to 255 and is derived from user data, is not properly validated before being used in a memory copy operation. This oversight allows for a potential buffer overflow, as the function can attempt to copy more data than the buffer can safely accommodate.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/3c0f8a59f2cc8841ee6653399a77f4f3e6e9a270 | kernel.org | Patch |
| https://git.kernel.org/stable/c/62ac2473553a00229e67bdf3cb023b62cf7f5a9a | kernel.org | Patch |
| https://git.kernel.org/stable/c/6402116a7b5ec80fa40fd145a80c813019cd555f | kernel.org | Patch |
| https://git.kernel.org/stable/c/66c8e816f2f2ca4a61b406503bd10bad1b35f72f | kernel.org | Patch |
| https://git.kernel.org/stable/c/91443c669d280937968f0aa4edefa741cfe35314 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-787 | Out-of-bounds Write | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 5.7, < 5.10.137 >= 5.11, < 5.15.61 >= 5.16, < 5.18.18 >= 5.19, < 5.19.2 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 4, 2026 | CVE Modified | kernel.org |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Nov 18, 2025 | Initial Analysis | [email protected] |
| Jun 18, 2025 | New CVE Received | kernel.org |