CVE-2022-50156
Linux Kernel vulnerability analysis and mitigation

Overview

A buffer overflow vulnerability (CVE-2022-50156) was discovered in the Linux kernel's HID cp2112 driver. The vulnerability was identified in the cp2112xfer() function where the 'readlength' variable, which is provided by user input through 'data->block[0]', can take values between 0-255 without proper bounds checking (NVD, Wiz).

Technical details

The vulnerability exists in the drivers/hid/hid-cp2112.c file, specifically in the cp2112xfer() function at line 793. Two Smatch warnings were identified: one for 'data->block[1]' being too small (33 vs 255) and another for 'buf' being too small (64 vs 255). The issue stems from insufficient validation of the 'readlength' variable which is provided by user input through 'data->block[0]' (NVD).

Impact

The buffer overflow vulnerability could allow an attacker to write beyond the intended buffer boundaries, potentially leading to memory corruption. This could result in system crashes or potentially arbitrary code execution (Wiz).

Mitigation and workarounds

The vulnerability has been patched by adding an upper bound to the 'read_length' variable to prevent buffer overflow in the memcpy() operation. Users should update their Linux kernel to a version that includes this fix (Wiz).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40258HIGH7
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-devel-matched
NoNoDec 04, 2025
CVE-2025-40259MEDIUM6.2
  • Linux KernelLinux Kernel
  • kernel-rt-64k
NoNoDec 04, 2025
CVE-2025-40264MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-64k-modules-extra
NoNoDec 04, 2025
CVE-2025-40254MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-64k-devel-matched
NoNoDec 04, 2025
CVE-2025-40253MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-64k-debug-modules-partner
NoNoDec 04, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management