CVE-2022-50131CWE-787

CVE-2022-50131

High · published June 18, 2025

CVSS v3.1
7.8
EPSS
0%
Percentile
12.4
In the wild
Unconfirmed
What it is

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().

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00225 · 12.4th percentile
Weakness
CWE-787 · Out-of-bounds Write
Published
2025-06-18T15:15Z
Affected products (4)
ProductVersionsFixed in
linux/linux_kernel≥ 5.7, < 5.10.1375.10.137
linux/linux_kernel≥ 5.11, < 5.15.615.15.61
linux/linux_kernel≥ 5.16, < 5.18.185.18.18
linux/linux_kernel≥ 5.19, < 5.19.25.19.2
References (5)
EPSS history
Timeline
  • 18 JUN 11:02Z
    HID: mcp2221: prevent a buffer overflow in mcp_smbus_write()
    cvelistv5