Bug 2373461 (CVE-2022-50156) - CVE-2022-50156 kernel: HID: cp2112: prevent a buffer overflow in cp2112_xfer()
Summary: CVE-2022-50156 kernel: HID: cp2112: prevent a buffer overflow in cp2112_xfer()
Keywords:
Status: NEW
Alias: CVE-2022-50156
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-06-18 12:04 UTC by OSIDB Bzimport
Modified: 2025-06-20 10:10 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-06-18 12:04:01 UTC
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 cp2112_xfer() error: __memcpy()
'data->block[1]' too small (33 vs 255)
drivers/hid/hid-cp2112.c:793 cp2112_xfer() error: __memcpy() 'buf' too
small (64 vs 255)

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

Comment 1 Avinash Hanwate 2025-06-20 03:39:55 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025061824-CVE-2022-50156-3e2e@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.