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 /> &amp;#39;&amp;mcp-&gt;txbuf[5]&amp;#39; too small (59 vs 255)<br /> drivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() &amp;#39;buf&amp;#39;<br /> too small (34 vs 255)<br /> <br /> The &amp;#39;len&amp;#39; variable can take a value between 0-255 as it can come from<br /> data-&gt;block[0] and it is user data. So add an bound check to prevent a<br /> buffer overflow in memcpy().

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)