Linux · Linux Kernel · CVE-2021-47182
**Name of the Vulnerable Software and Affected Versions**
Linux kernel (affected versions not specified)
**Description**
The issue is related to the `scsi mode sense()` function in the Linux kernel, which has problems with buffer length handling. Specifically, the allocation length field of the MODE SENSE(10) command is 16-bits, but it is set by assigning `len` to byte 8 only, thus truncating buffer lengths larger than 255. Additionally, if `scsi mode sense()` is called with `len` smaller than 8 with `sdev->use 10 for ms` set, or smaller than 4 otherwise, the buffer length is increased to 8 and 4 respectively, and the buffer is zero-filled with these increased values, thus corrupting the memory following the buffer. The issue can be exploited to execute arbitrary code.
**Recommendations**
At the moment, there is no information about a newer version that contains a fix for this vulnerability.