Vulnerability · Published Jun 18, 2025 · Assigned by Linux
CVE-2022-50131HID: mcp2221: prevent a buffer overflow in mcp_smbus_write()
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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().
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.0.2-1 | DEBIAN-CVE-2022-50131 |
| Debian:13 | linux | 6.0.2-1 | DEBIAN-CVE-2022-50131 |
| Debian:14 | linux | 6.0.2-1 | DEBIAN-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux | 5.15.0-53.59 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1023.27 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1023.29 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1024.30.1 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1022.29 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1020.25 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1008.12 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1018.21 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1018.23 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1021.26 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-53.59 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1015.15 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1022.28 | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1018.20 | UBUNTU-CVE-2022-50131 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2022-50131 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2022-50131 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 67a95c21463d066060b0f66d65a75d45bb386ffb – before 66c8e816f2f2ca4a61b406503bd10bad1b35f72f67a95c21463d066060b0f66d65a75d45bb386ffb – before 91443c669d280937968f0aa4edefa741cfe3531467a95c21463d066060b0f66d65a75d45bb386ffb – before 6402116a7b5ec80fa40fd145a80c813019cd555f67a95c21463d066060b0f66d65a75d45bb386ffb – before 3c0f8a59f2cc8841ee6653399a77f4f3e6e9a27067a95c21463d066060b0f66d65a75d45bb386ffb – before 62ac2473553a00229e67bdf3cb023b62cf7f5a9a |
| Linux | Linux | 5.7 |
References
- https://git.kernel.org/stable/c/66c8e816f2f2ca4a61b406503bd10bad1b35f72f
- https://git.kernel.org/stable/c/91443c669d280937968f0aa4edefa741cfe35314
- https://git.kernel.org/stable/c/6402116a7b5ec80fa40fd145a80c813019cd555f
- https://git.kernel.org/stable/c/3c0f8a59f2cc8841ee6653399a77f4f3e6e9a270
- https://git.kernel.org/stable/c/62ac2473553a00229e67bdf3cb023b62cf7f5a9a