{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-50156","id":"CVE-2022-50156","title":"HID: cp2112: prevent a buffer overflow in cp2112_xfer()","description":"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 co","descriptionLong":"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().","published":"2025-06-18T11:03:13.913Z","updated":"2026-10-28T02:31:12.116669214Z","reserved":"2025-06-18T10:57:27.425Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},"metrics":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"Linux"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","lessThan":"3af7d60e9a6c17d6d41c4341f8020511887d372d","status":"affected","versionType":"git"},{"version":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","lessThan":"519ff31a6ddd87aa4905bd9bf3b92e8b88801614","status":"affected","versionType":"git"},{"version":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","lessThan":"ebda3d6b004bb6127a66a616524a2de152302ca7","status":"affected","versionType":"git"},{"version":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","lessThan":"8489a20ac481b08c0391608d81ed3796d373cfdf","status":"affected","versionType":"git"},{"version":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","lessThan":"e7028944e61014ae915e7fb74963d3835f2f761a","status":"affected","versionType":"git"},{"version":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","lessThan":"26e427ac85c2b8d0d108cc80b6de34d33e2780c4","status":"affected","versionType":"git"},{"version":"542134c0375b5ca2b1d18490c02b8a20bfdd8d74","lessThan":"381583845d19cb4bd21c8193449385f3fefa9caf","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.15","status":"affected"},{"version":"0","lessThan":"4.15","status":"unaffected","versionType":"semver"},{"version":"4.19.256","lessThanOrEqual":"4.19.*","status":"unaffected","versionType":"semver"},{"version":"5.4.211","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.137","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.61","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"5.18.18","lessThanOrEqual":"5.18.*","status":"unaffected","versionType":"semver"},{"version":"5.19.2","lessThanOrEqual":"5.19.*","status":"unaffected","versionType":"semver"},{"version":"6.0","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-787"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/3af7d60e9a6c17d6d41c4341f8020511887d372d","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/519ff31a6ddd87aa4905bd9bf3b92e8b88801614","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/ebda3d6b004bb6127a66a616524a2de152302ca7","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/8489a20ac481b08c0391608d81ed3796d373cfdf","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/e7028944e61014ae915e7fb74963d3835f2f761a","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/26e427ac85c2b8d0d108cc80b6de34d33e2780c4","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/381583845d19cb4bd21c8193449385f3fefa9caf","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50156.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50156","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00236,"epssPercentile":0.14713,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-50156","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50156","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-50156","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-50156","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}