Buffer Length Handling Vulnerability in Linux Kernel - CVE-2021-47182

linux Updated 02 Oct 2025

Summary

10/04/2024
N/A
No i
Medium
5.5

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Share this vulnerability

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.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback