CVE-2022-50156

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50156
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50156.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50156
Downstream
Related
Published
2025-06-18T11:15:45Z
Modified
2025-08-09T20:01:28Z
Summary
[none]
Details

In the Linux kernel, the following vulnerability has been resolved:

HID: cp2112: prevent a buffer overflow in cp2112_xfer()

Smatch warnings: drivers/hid/hid-cp2112.c:793 cp2112xfer() error: _memcpy() 'data->block[1]' too small (33 vs 255) drivers/hid/hid-cp2112.c:793 cp2112xfer() error: _memcpy() 'buf' too small (64 vs 255)

The 'readlength' variable is provided by 'data->block[0]' which comes from user and it(readlength) can take a value between 0-255. Add an upper bound to 'read_length' variable to prevent a buffer overflow in memcpy().

References

Affected packages