CVE-2022-50131
Severity CVSS v4.0:
Pending analysis
Type:
CWE-787
Out-of-bounds Write
Publication date:
18/06/2025
Last modified:
18/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
HID: mcp2221: prevent a buffer overflow in mcp_smbus_write()<br />
<br />
Smatch Warning:<br />
drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy()<br />
&#39;&mcp->txbuf[5]&#39; too small (59 vs 255)<br />
drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() &#39;buf&#39;<br />
too small (34 vs 255)<br />
<br />
The &#39;len&#39; variable can take a value between 0-255 as it can come from<br />
data->block[0] and it is user data. So add an bound check to prevent a<br />
buffer overflow in memcpy().
Impact
Base Score 3.x
7.80
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.7 (including) | 5.10.137 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.61 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 5.18.18 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.19 (including) | 5.19.2 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/3c0f8a59f2cc8841ee6653399a77f4f3e6e9a270
- https://git.kernel.org/stable/c/62ac2473553a00229e67bdf3cb023b62cf7f5a9a
- https://git.kernel.org/stable/c/6402116a7b5ec80fa40fd145a80c813019cd555f
- https://git.kernel.org/stable/c/66c8e816f2f2ca4a61b406503bd10bad1b35f72f
- https://git.kernel.org/stable/c/91443c669d280937968f0aa4edefa741cfe35314



