{"id":"CVE-2022-50156","summary":"HID: cp2112: prevent a buffer overflow in cp2112_xfer()","details":"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-\u003eblock[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-\u003eblock[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().","modified":"2026-04-03T13:14:34.148731Z","published":"2025-06-18T11:03:13.913Z","related":["SUSE-SU-2025:02264-1","SUSE-SU-2025:02308-1","SUSE-SU-2025:02320-1","SUSE-SU-2025:02321-1","SUSE-SU-2025:02322-1","SUSE-SU-2025:02537-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50156.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/26e427ac85c2b8d0d108cc80b6de34d33e2780c4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/381583845d19cb4bd21c8193449385f3fefa9caf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3af7d60e9a6c17d6d41c4341f8020511887d372d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/519ff31a6ddd87aa4905bd9bf3b92e8b88801614"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8489a20ac481b08c0391608d81ed3796d373cfdf"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e7028944e61014ae915e7fb74963d3835f2f761a"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ebda3d6b004bb6127a66a616524a2de152302ca7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50156.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50156"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74"},{"fixed":"3af7d60e9a6c17d6d41c4341f8020511887d372d"},{"fixed":"519ff31a6ddd87aa4905bd9bf3b92e8b88801614"},{"fixed":"ebda3d6b004bb6127a66a616524a2de152302ca7"},{"fixed":"8489a20ac481b08c0391608d81ed3796d373cfdf"},{"fixed":"e7028944e61014ae915e7fb74963d3835f2f761a"},{"fixed":"26e427ac85c2b8d0d108cc80b6de34d33e2780c4"},{"fixed":"381583845d19cb4bd21c8193449385f3fefa9caf"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50156.json"}}],"schema_version":"1.7.5"}