Critical Vulnerability in Linux Kernel: Avoiding smp_processor_id() in Preemptible Code

linux Updated 02 Oct 2025

Summary

25/03/2024
N/A
No i
Medium
5.5

CVE-2021-47178: In the Linux kernel, the following vulnerability has been resolved: scsi: target: core: Avoid smp_processor_id() in preemptible code The BUG message "BUG: using smp_processor_id() in preemptible [00000000] code" was obse... 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 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 Linux kernel is the core component of many operating systems, providing essential services for hardware and software interactions. It is known for its robustness and flexibility, supporting a wide range of devices and architectures. However, it is also susceptible to vulnerabilities that can compromise system stability and security. This specific vulnerability affects the SCSI target subsystem, particularly impacting TCMU devices, which are used for block storage operations.

Vulnerability Detail

In the Linux kernel, a vulnerability has been identified where the function smp_processor_id() is called within preemptible code. This can lead to unexpected behavior and system crashes, particularly when running tests like blktests block/005 on TCMU devices. The issue arises from a commit that modified work queue handling, resulting in the CPU ID being accessed inappropriately during command processing. The vulnerability can manifest during normal operations and system shutdowns, leading to potential data loss or system instability.

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 temporary workaround, users can avoid running tests that trigger the vulnerability, such as blktests block/005, especially on TCMU devices. Additionally, it is advisable to ensure that TCMU devices are properly cleaned up before system shutdown to prevent the issue from occurring.

Conclusion

The vulnerability identified in the Linux kernel regarding the use of smp_processor_id() in preemptible code poses significant risks to system stability, particularly for TCMU devices. Users are strongly advised to upgrade their kernel to the latest version to mitigate these risks. Temporary workarounds are available, but a permanent fix through an upgrade is essential for long-term security.

See every vulnerability recorded for linux →

Share this vulnerability

FAQ

The vulnerability can lead to system crashes and instability, particularly during operations involving TCMU devices.

You can use tools like Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.

The vulnerability affects various versions of the Linux kernel prior to the fix included in version 5.14.6-1.

Yes, updating to the latest version of the Linux kernel that includes the fix is the permanent solution.

If an immediate upgrade is not possible, avoid running tests that trigger the vulnerability and ensure proper cleanup of TCMU devices before shutdown.

Related vulnerabilities

Recent vulnerabilities recorded for linux.

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