CVE-2021-47178
kernel: scsi: target: core: Avoid smp_processor_id() in preemptible code
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · March 25, 2024
Updated · September 27, 2026
Description
This linux kernel vulnerability occurs in the SCSI target core subsystem, specifically concerning how CPU IDs are handled for TCMU (Target Core Module in Userspace) devices. The issue arises because the kernel previously used the smp_processor_id() function within preemptible code during abort handling in the SCSI host work queue. This unsafe operation triggers a kernel BUG message and potential system instability when thread migrations occur, particularly noticeable when the DEBUG_PREEMPT configuration is enabled. Patched kernel versions resolve the vulnerability by replacing this check with raw_smp_processor_id(), allowing the system to safely retrieve the CPU ID for performance optimizations without violating preemptible code constraints.
Statement
This vulnerability is rated as having a Low impact because exploiting it requires privileged access to configure SCSI target infrastructure, and the issue primarily surfaces as diagnostic warnings under debug configurations rather than causing system failure in standard production environments. Production Red Hat Enterprise Linux kernels ship with preemption debugging disabled, meaning thread preemption during processor identification only affects non-critical performance affinity hints rather than data integrity or kernel stability. Additionally, the SCSI target core framework and userspace target devices are not enabled or active in default configurations.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 4.4CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H
CWE-99 · Improper Control of Resource Identifiers ('Resource Injection')