CVE-2021-47258

scsi: core: Fix error handling of scsi_host_alloc()

MEDIUM
5.5
CVSS Score
Published: May 21, 2024 at 02:19 PM UTC
Updated: June 17, 2026 at 04:17 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.9.2732.6.30 ≤ v < 4.14.2372.6.30 ≤ v < 4.19.1952.6.30 ≤ v < 4.9.2732.6.30 ≤ v < 5.10.442.6.30 ≤ v < 5.12.112.6.30 ≤ v < 5.132.6.30 ≤ v < 5.4.1264.10 ≤ v < 4.14.2374.15 ≤ v < 4.19.1954.20 ≤ v < 5.4.1265.11 ≤ v < 5.12.115.5 ≤ v < 5.10.441fa5ae857bb14f6046205171d98506d8112dd74e5.13 rc15.13 rc25.13 rc35.13 rc45.13 rc5
Vendor states this is fixed in 2dc85045ae65b9302a1d2e2ddd7ce4c030153a6a (fixed)
Vendor states this is fixed in 45d83db4728127944b237c0c8248987df9d478e7 (fixed)
Vendor states this is fixed in 66a834d092930cf41d809c0e989b13cd6f9ca006 (fixed)
Vendor states this is fixed in 79296e292d67fa7b5fb8d8c27343683e823872c8 (fixed)
Vendor states this is fixed in 7a696ce1d5d16a33a6cd6400bbcc0339b2460e11 (fixed)
Vendor states this is fixed in 8958181c1663e24a13434448e7d6b96b5d04900a (fixed)
Vendor states this is fixed in db08ce595dd64ea9859f7d088b51cbfc8e685c66 (fixed)
Vendor states this is fixed in 2.6.30 (unaffected)
Vendor states this is fixed in 4.14.237 (unaffected)
Vendor states this is fixed in 4.19.195 (unaffected)
Vendor states this is fixed in 4.9.273 (unaffected)
Vendor states this is fixed in 5.10.44 (unaffected)
Vendor states this is fixed in 5.12.11 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)
Vendor states this is fixed in 5.4.126 (unaffected)

References (7)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2dc85045ae65b9302a1d2e2ddd7ce4c030153a6a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/45d83db4728127944b237c0c8248987df9d478e7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/66a834d092930cf41d809c0e989b13cd6f9ca006
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/79296e292d67fa7b5fb8d8c27343683e823872c8
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7a696ce1d5d16a33a6cd6400bbcc0339b2460e11
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8958181c1663e24a13434448e7d6b96b5d04900a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/db08ce595dd64ea9859f7d088b51cbfc8e685c66

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-401

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card