Buffer Length Handling Vulnerability in Linux Kernel - CVE-2021-47182
Summary
CVE-2021-47182: In the Linux kernel, the following vulnerability has been resolved: scsi: core: Fix scsi_mode_sense() buffer length handling Several problems exist with scsi_mode_sense() buffer length handling: 1) The allocation length... Affects linux versions 5.10.103-1 – 6.9.9-1. 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 Linux kernel is the core component of many operating systems, providing essential services for hardware and software interactions. It manages system resources and facilitates communication between hardware and software applications. This vulnerability specifically affects the SCSI (Small Computer System Interface) subsystem, which is responsible for communication with storage devices. The vulnerability arises from improper handling of buffer lengths in the scsi_mode_sense() function, potentially leading to memory corruption and system instability.
Vulnerability Detail
CVE-2021-47182 is a vulnerability in the Linux kernel's SCSI subsystem, particularly in the scsi_mode_sense() function. The issue originates from incorrect handling of the allocation length field in the MODE SENSE(10) command, which is limited to 16 bits. This limitation can lead to buffer length truncation for requests larger than 255 bytes. Additionally, if the function is called with a length smaller than expected, it zero-fills the buffer, corrupting adjacent memory. This vulnerability can result in system crashes or unauthorized access to sensitive data, making it critical to address.
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
Currently, there are no specific workarounds mentioned for this vulnerability. The best course of action is to apply the available patches as soon as possible.
Conclusion
CVE-2021-47182 is a critical vulnerability in the Linux kernel that affects the SCSI subsystem's buffer length handling. It poses significant risks, including memory corruption and potential data breaches. Users are strongly advised to update their systems to the latest kernel version to mitigate these risks. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.
See every vulnerability recorded for linux →
FAQ
CVE-2021-47182 is a vulnerability in the Linux kernel's SCSI subsystem that affects the handling of buffer lengths in the scsi_mode_sense() function.
The vulnerability can lead to memory corruption, system crashes, and unauthorized access to sensitive data.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without needing to sign up.
While there are no specific workarounds, it is crucial to plan for an update as soon as possible to mitigate the risks associated with this vulnerability.
More information can be found in the official CVE database and the Linux kernel mailing list discussions regarding the patch.
Related vulnerabilities
Recent vulnerabilities recorded for linux.