HID: usbhid: free raw_report buffers in usbhid_stop
Summary
GSD-2021-1001712: HID: usbhid: free raw_report buffers in usbhid_stop. Affects Kernel versions < 2b704864c92dcec2b295f276fcfbfb81d9831f81. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The HID (Human Interface Device) subsystem in the Linux Kernel is responsible for managing input devices such as keyboards, mice, and game controllers. The usbhid module is a driver that handles USB HID devices. It provides a generic interface for communication between the USB HID devices and the kernel. The usbhid_stop function is used to stop the usbhid driver and release any allocated resources. However, there is a vulnerability in the usbhid_stop function that can lead to a memory leak, potentially causing system instability or denial of service.
Vulnerability Detail
The vulnerability in the usbhid_stop function allows for the improper handling of raw_report buffers, leading to a memory leak. When the usbhid driver is stopped, it fails to properly free the raw_report buffers, resulting in memory leakage. An attacker could potentially exploit this vulnerability to exhaust system memory resources, causing system instability or denial of service. The impact and attack plausibility of this vulnerability have not been proven yet.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a workaround, users can disable or unload the usbhid module if it is not required for their system. This can be done by running the following command as root:
modprobe -r usbhid
Conclusion
The HID: usbhid: free raw_report buffers in usbhid_stop vulnerability in the Linux Kernel can lead to a memory leak and potential system instability or denial of service. It is recommended to update the Linux Kernel to version v5.14.10 or later to fix the vulnerability. Alternatively, users can disable or unload the usbhid module if it is not required for their system. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The HID subsystem in the Linux Kernel is responsible for managing input devices such as keyboards, mice, and game controllers. It provides a generic interface for communication between the USB HID devices and the kernel.
The usbhid module is a driver in the Linux Kernel that handles USB HID devices. It provides the necessary functionality for the kernel to communicate with USB HID devices.
The usbhid_stop function is used to stop the usbhid driver and release any allocated resources. It is called when the USB HID device is disconnected or when the driver is unloaded.
The vulnerability can lead to a memory leak, potentially causing system instability or denial of service. However, the actual impact and attack plausibility have not been proven yet.
To fix the vulnerability, users should update their Linux Kernel to version v5.14.10 or later. This can be done by downloading the updated kernel source code from the official Linux Kernel repository and compiling it according to the provided instructions.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.