CVE-2022-50156
HID: cp2112: prevent a buffer overflow in cp2112_xfer()
Check your servers for CVE-2022-50156
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-50156 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
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().
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.24%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 15.5% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 542134c0375b5ca2b1d18490c02b8a20bfdd8d74, before 3af7d60e9a6c17d6d41c4341f8020511887d372d affected from 542134c0375b5ca2b1d18490c02b8a20bfdd8d74, before 519ff31a6ddd87aa4905bd9bf3b92e8b88801614 affected from 542134c0375b5ca2b1d18490c02b8a20bfdd8d74, before ebda3d6b004bb6127a66a616524a2de152302ca7 affected from 542134c0375b5ca2b1d18490c02b8a20bfdd8d74, before 8489a20ac481b08c0391608d81ed3796d373cfdf affected from 542134c0375b5ca2b1d18490c02b8a20bfdd8d74, before e7028944e61014ae915e7fb74963d3835f2f761a affected from 542134c0375b5ca2b1d18490c02b8a20bfdd8d74, before 26e427ac85c2b8d0d108cc80b6de34d33e2780c4 affected from 542134c0375b5ca2b1d18490c02b8a20bfdd8d74, before 381583845d19cb4bd21c8193449385f3fefa9caf
Other versions: unaffected
|
| Linux |
affected 4.15 unaffected before 4.15 unaffected from 4.19.256 up to and including 4.19.* unaffected from 5.4.211 up to and including 5.4.* unaffected from 5.10.137 up to and including 5.10.* unaffected from 5.15.61 up to and including 5.15.* unaffected from 5.18.18 up to and including 5.18.* unaffected from 5.19.2 up to and including 5.19.* unaffected 6.0 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-50156 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-50156
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2022-50156
trivy image --scanners vuln IMAGE | grep CVE-2022-50156
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/3af7d60e9a6c17d6d41c4341f8020511887d372d git.kernel.org
- https://git.kernel.org/stable/c/519ff31a6ddd87aa4905bd9bf3b92e8b88801614 git.kernel.org
- https://git.kernel.org/stable/c/ebda3d6b004bb6127a66a616524a2de152302ca7 git.kernel.org
- https://git.kernel.org/stable/c/8489a20ac481b08c0391608d81ed3796d373cfdf git.kernel.org
- https://git.kernel.org/stable/c/e7028944e61014ae915e7fb74963d3835f2f761a git.kernel.org
- https://git.kernel.org/stable/c/26e427ac85c2b8d0d108cc80b6de34d33e2780c4 git.kernel.org
- https://git.kernel.org/stable/c/381583845d19cb4bd21c8193449385f3fefa9caf git.kernel.org
Source: the record CVE-2022-50156 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse