CVE-2021-47258: scsi: core: Fix error handling of scsi_host_alloc()
In the Linux kernel, the following vulnerability has been resolved:
scsi: core: Fix error handling of scsi_host_alloc()
After device is initialized via device_initialize(), or its name is set via
dev_set_name(), the device has to be freed via put_device(). Otherwise
device name will be leaked because it is allocated dynamically in
dev_set_name().
Fix the leak by replacing kfree() with put_device(). Since
scsi_host_dev_release() properly handles IDA and kthread removal, remove
special-casing these from the error handling as well.
Security readout for executives and security teams
Plain-English summary
CVE-2021-47258 is a Linux kernel SCSI core resource-leak bug in an allocation error path. The public record describes leaked device names when cleanup uses the wrong release function. It is not listed in KEV, and the bundle provides no CVSS score, exploit report, or business-impact details.
Executive priority
Handle through normal kernel patch management unless a critical storage platform uses an affected unsupported kernel. There is no sourced evidence of active exploitation or a remote attack path, but kernel resource leaks still matter for operational resilience.
Technical view
After device_initialize() or dev_set_name(), Linux kernel device cleanup must use put_device(). In scsi_host_alloc() error handling, kfree() could leave the dynamically allocated device name leaked and bypass normal release cleanup. Stable kernel commits replace kfree() with put_device() and rely on scsi_host_dev_release() for IDA and kthread cleanup.
Likely exposure
Exposure is limited to Linux systems running affected kernel versions or unpatched backports containing the vulnerable SCSI core behavior. Systems using SCSI-backed storage, virtualization storage, or storage appliances are the most relevant to review. The sources do not establish remote reachability or attacker prerequisites.
Exploitation context
No supplied source reports active exploitation, and KEV is false. The evidence describes a kernel resource leak during error handling, not a complete attack path. Treat exploitability and practical impact as unproven from the provided material.
Researcher notes
The record is narrow and implementation-specific. Key evidence is the SCSI core cleanup change from kfree() to put_device() after device initialization/name assignment. Public metadata lacks CVSS, CWE, exploitability detail, and concrete impact beyond the described leak.
Mitigation direction
Check Linux distribution advisories for CVE-2021-47258 coverage.
Update affected kernels to vendor-supported builds containing the stable fixes.
Prioritize storage-heavy Linux servers, hypervisors, and appliances for review.
Track unsupported kernels for replacement or compensating lifecycle controls.
Validation and detection
Inventory running Linux kernel versions across managed assets.
Confirm vendor backport status for the listed stable kernel commits.
Review vulnerability scanner results against actual running kernels, not package cache only.
Document exceptions where vendor guidance is unavailable or unclear.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47258 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.