{"id":"CVE-2022-50156","aliases":["CVE-2022-50156"],"related":[],"kind":"vulnerability","state":"published","title":"HID: cp2112: prevent a buffer overflow in cp2112_xfer()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: cp2112: prevent a buffer overflow in cp2112_xfer()\n\nSmatch warnings:\ndrivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy()\n'data->block[1]' too small (33 vs 255)\ndrivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'buf' too\nsmall (64 vs 255)\n\nThe 'read_length' variable is provided by 'data->block[0]' which comes\nfrom user and it(read_length) can take a value between 0-255. Add an\nupper bound to 'read_length' variable to prevent a buffer overflow in\nmemcpy().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: cp2112: prevent a buffer overflow in cp2112_xfer()\n\nSmatch warnings:\ndrivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy()\n'data->block[1]' too small (33 vs 255)\ndrivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'buf' too\nsmall (64 vs 255)\n\nThe 'read_length' variable is provided by 'data->block[0]' which comes\nfrom user and it(read_length) can take a value between 0-255. Add an\nupper bound to 'read_length' variable to prevent a buffer overflow in\nmemcpy().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: HID: cp2112: evitar un desbordamiento de búfer en cp2112_xfer() Advertencias de Smatch: drivers/hid/hid-cp2112.c:793 Error de cp2112_xfer(): __memcpy() 'data-&gt;block[1]' demasiado pequeño (33 frente a 255) drivers/hid/hid-cp2112.c:793 Error de cp2112_xfer(): __memcpy() 'buf' demasiado pequeño (64 frente a 255) La variable 'read_length' la proporciona 'data-&gt;block[0]', que proviene del usuario, y puede tomar un valor entre 0 y 255. Añada un límite superior a la variable 'read_length' para evitar un desbordamiento de búfer en memcpy().","source":"nvd"}],"published":"2025-06-18T11:03:13.913Z","modified":"2026-08-05T08:57:33.812Z","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":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","fixed":"3af7d60e9a6c17d6d41c4341f8020511887d372d","status":"affected"},{"type":"git","introduced":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","fixed":"519ff31a6ddd87aa4905bd9bf3b92e8b88801614","status":"affected"},{"type":"git","introduced":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","fixed":"ebda3d6b004bb6127a66a616524a2de152302ca7","status":"affected"},{"type":"git","introduced":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","fixed":"8489a20ac481b08c0391608d81ed3796d373cfdf","status":"affected"},{"type":"git","introduced":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","fixed":"e7028944e61014ae915e7fb74963d3835f2f761a","status":"affected"},{"type":"git","introduced":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","fixed":"26e427ac85c2b8d0d108cc80b6de34d33e2780c4","status":"affected"},{"type":"git","introduced":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","fixed":"381583845d19cb4bd21c8193449385f3fefa9caf","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.15","status":"unaffected"},{"type":"semver","introduced":"4.19.256","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.211","lastAffected":"5.4.*","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":"4.15.1","fixed":"4.19.256"},{"status":"affected","introduced":"4.20","fixed":"5.4.211"},{"status":"affected","introduced":"5.5","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"},{"status":"affected","version":"4.15"},{"status":"affected","version":"4.15"},{"status":"affected","version":"4.15"},{"status":"affected","version":"4.15"},{"status":"affected","version":"4.15"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/3af7d60e9a6c17d6d41c4341f8020511887d372d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/519ff31a6ddd87aa4905bd9bf3b92e8b88801614","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ebda3d6b004bb6127a66a616524a2de152302ca7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8489a20ac481b08c0391608d81ed3796d373cfdf","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e7028944e61014ae915e7fb74963d3835f2f761a","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/26e427ac85c2b8d0d108cc80b6de34d33e2780c4","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/381583845d19cb4bd21c8193449385f3fefa9caf","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50156","url":"https://www.cve.org/CVERecord?id=CVE-2022-50156","licence":"CVE Terms of Use","modified":"2026-08-05T08:57:33.812Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50156","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50156","licence":"Public domain","modified":"2026-08-04T10:18:06.150Z"}],"updatedAt":"2026-11-25T22:58:21.079Z","epss":{"score":0.00236,"percentile":0.15561,"date":"2026-12-01T12:00:22.000Z"}}