Vulnerability in Kernel: scsi_debug - kcalloc() Zero Size Argument

Kernel Updated 02 Oct 2025

Summary

27/12/2021
N/A
No i
Unrated
Not published

GSD-2021-1002712: scsi: scsi_debug: Don't call kcalloc() if size arg is zero. Affects Kernel versions < aa1f912712a109b6306746133de7e5343f016b26. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Kernel is a critical component of the Linux operating system that manages communication between hardware and software. It provides essential functionalities and services to ensure the proper functioning of the system. One of the components within the Kernel is scsi_debug, which is responsible for emulating a SCSI target device for testing and debugging purposes. It allows developers to simulate various scenarios and interactions with SCSI devices. However, a vulnerability has been identified in the scsi_debug module that involves the improper usage of kcalloc() when the size argument is zero.

Vulnerability Detail

The vulnerability in scsi_debug arises from a flaw in the code that calls kcalloc() without checking if the size argument is zero. This can lead to a potential memory allocation issue, as kcalloc() is used to allocate memory for an array. If the size argument is zero, it can result in an out-of-bounds memory access or other memory-related errors. An attacker may be able to exploit this vulnerability to execute arbitrary code, escalate privileges, or cause a denial-of-service condition. It is important to note that 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 avoid the vulnerability by refraining from using the scsi_debug module or by disabling it if not required. This can be achieved by removing the module or preventing it from loading during system startup. However, it is advisable to apply the official fix by updating the Kernel to ensure the overall security and stability of the system.

Conclusion

In conclusion, a vulnerability has been discovered in the scsi_debug module of the Linux Kernel, which involves the improper usage of kcalloc() when the size argument is zero. This vulnerability can potentially lead to memory-related issues and may be exploited by attackers. It is crucial to update the Kernel to the latest version to mitigate this vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for Kernel →

Share this vulnerability

FAQ

The scsi_debug module is a component of the Linux Kernel that emulates a SCSI target device for testing and debugging purposes. It allows developers to simulate various scenarios and interactions with SCSI devices.

kcalloc() is a function in the Linux Kernel that allocates and initializes memory for an array. It is similar to calloc() in the C programming language.

The impact of this vulnerability can vary depending on the specific exploitation scenario. It could potentially allow an attacker to execute arbitrary code, escalate privileges, or cause a denial-of-service condition.

There is no evidence to suggest that this vulnerability has been exploited in the wild. However, it is still important to apply the necessary updates and patches to mitigate any potential risks.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your system is affected by this vulnerability. It analyzes the manifest file (e.g., package-lock.json) of your application and provides real-time alerts for open-source vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for Kernel.

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