{"id":"CVE-2022-50131","aliases":["CVE-2022-50131"],"related":[],"kind":"vulnerability","state":"published","title":"HID: mcp2221: prevent a buffer overflow in mcp_smbus_write()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: mcp2221: prevent a buffer overflow in mcp_smbus_write()\n\nSmatch Warning:\ndrivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy()\n'&mcp->txbuf[5]' too small (59 vs 255)\ndrivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() 'buf'\ntoo small (34 vs 255)\n\nThe 'len' variable can take a value between 0-255 as it can come from\ndata->block[0] and it is user data. So add an bound check to prevent a\nbuffer overflow in memcpy().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: mcp2221: prevent a buffer overflow in mcp_smbus_write()\n\nSmatch Warning:\ndrivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy()\n'&mcp->txbuf[5]' too small (59 vs 255)\ndrivers/hid/hid-mcp2221.c:388 mcp_smbus_write() error: __memcpy() 'buf'\ntoo small (34 vs 255)\n\nThe 'len' variable can take a value between 0-255 as it can come from\ndata->block[0] and it is user data. So add an bound check to prevent a\nbuffer overflow in memcpy().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: HID: mcp2221: evitar un desbordamiento de búfer en mcp_smbus_write() Advertencia de Smatch: drivers/hid/hid-mcp2221.c:388 Error de mcp_smbus_write(): __memcpy() '&amp;mcp-&gt;txbuf[5]' demasiado pequeño (59 frente a 255) drivers/hid/hid-mcp2221.c:388 Error de mcp_smbus_write(): __memcpy() 'buf' demasiado pequeño (34 frente a 255) La variable 'len' puede tomar un valor entre 0 y 255, ya que puede provenir de data-&gt;block[0] y son datos de usuario. Por lo tanto, agregue una comprobación de límite para evitar un desbordamiento de búfer en memcpy().","source":"nvd"}],"published":"2025-06-18T11:02:56.796Z","modified":"2026-08-05T08:57:29.234Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"67a95c21463d066060b0f66d65a75d45bb386ffb","fixed":"66c8e816f2f2ca4a61b406503bd10bad1b35f72f","status":"affected"},{"type":"git","introduced":"67a95c21463d066060b0f66d65a75d45bb386ffb","fixed":"91443c669d280937968f0aa4edefa741cfe35314","status":"affected"},{"type":"git","introduced":"67a95c21463d066060b0f66d65a75d45bb386ffb","fixed":"6402116a7b5ec80fa40fd145a80c813019cd555f","status":"affected"},{"type":"git","introduced":"67a95c21463d066060b0f66d65a75d45bb386ffb","fixed":"3c0f8a59f2cc8841ee6653399a77f4f3e6e9a270","status":"affected"},{"type":"git","introduced":"67a95c21463d066060b0f66d65a75d45bb386ffb","fixed":"62ac2473553a00229e67bdf3cb023b62cf7f5a9a","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.7","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.7","status":"unaffected"},{"type":"semver","introduced":"5.10.137","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.61","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.18.18","lastAffected":"5.18.*","status":"unaffected"},{"type":"semver","introduced":"5.19.2","lastAffected":"5.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.7","fixed":"5.10.137"},{"status":"affected","introduced":"5.11","fixed":"5.15.61"},{"status":"affected","introduced":"5.16","fixed":"5.18.18"},{"status":"affected","introduced":"5.19","fixed":"5.19.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/66c8e816f2f2ca4a61b406503bd10bad1b35f72f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/91443c669d280937968f0aa4edefa741cfe35314","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6402116a7b5ec80fa40fd145a80c813019cd555f","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3c0f8a59f2cc8841ee6653399a77f4f3e6e9a270","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/62ac2473553a00229e67bdf3cb023b62cf7f5a9a","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50131","url":"https://www.cve.org/CVERecord?id=CVE-2022-50131","licence":"CVE Terms of Use","modified":"2026-08-05T08:57:29.234Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50131","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50131","licence":"Public domain","modified":"2026-08-04T10:18:05.643Z"}],"updatedAt":"2026-11-25T22:58:21.068Z","epss":{"score":0.00326,"percentile":0.18157,"date":"2026-11-30T12:00:22.000Z"}}