CVE-2021-47258
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2021-47258 affects the Linux kernel's SCSI subsystem, specifically related to error handling in the scsi_host_alloc() function. The vulnerability was discovered and disclosed in May 2024. The issue occurs after device initialization via device_initialize() or when the device name is set via dev_set_name(), where the device name could be leaked due to improper memory management (NVD).

Technical details

The vulnerability stems from improper memory management in the SCSI core subsystem. When a device is initialized or its name is set, the device name is allocated dynamically in dev_set_name(). The original code used kfree() for cleanup, but this was incorrect as the proper cleanup method should be put_device() to prevent memory leaks. The issue specifically affects the error handling paths in scsi_host_alloc() function (Kernel Commit).

Impact

The vulnerability results in a memory leak condition where device names allocated during SCSI host initialization are not properly freed. This occurs because the cleanup process uses incorrect deallocation methods, potentially leading to resource exhaustion over time (NVD).

Mitigation and workarounds

The issue has been fixed by replacing kfree() with put_device() in the error handling path. Additionally, since scsi_host_dev_release() properly handles IDA and kthread removal, special-case handling was removed from the error handling. The fix has been implemented and merged into the Linux kernel (Kernel Commit).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-80904MEDIUM5.9
  • Linux Kernel logoLinux Kernel
  • linux-hwe-7.0
NoYesSep 04, 2026
CVE-2026-80905MEDIUM5.5
  • Linux Kernel logoLinux Kernel
  • linux-nvidia-7.0
NoYesSep 04, 2026
CVE-2026-80913MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-intel-iotg-5.15
NoYesSep 04, 2026
CVE-2026-80912MEDIUM4.4
  • Linux Kernel logoLinux Kernel
  • linux-gcp-fips
NoYesSep 04, 2026
CVE-2026-80906NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-7.0
NoYesSep 04, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management