CVE-2021-47258
scsi: core: Fix error handling of scsi_host_alloc()
Check your servers for CVE-2021-47258
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-47258 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Exploitation
EPSS 0.24%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 15.6% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 23 May 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 8958181c1663e24a13434448e7d6b96b5d04900a affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before db08ce595dd64ea9859f7d088b51cbfc8e685c66 affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 2dc85045ae65b9302a1d2e2ddd7ce4c030153a6a affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 79296e292d67fa7b5fb8d8c27343683e823872c8 affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 7a696ce1d5d16a33a6cd6400bbcc0339b2460e11 affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 45d83db4728127944b237c0c8248987df9d478e7 affected from 1fa5ae857bb14f6046205171d98506d8112dd74e, before 66a834d092930cf41d809c0e989b13cd6f9ca006
Other versions: unaffected
|
| Linux |
affected 2.6.30 unaffected before 2.6.30 unaffected from 4.9.273 up to and including 4.9.* unaffected from 4.14.237 up to and including 4.14.* unaffected from 4.19.195 up to and including 4.19.* unaffected from 5.4.126 up to and including 5.4.* unaffected from 5.10.44 up to and including 5.10.* unaffected from 5.12.11 up to and including 5.12.* unaffected 5.13 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-47258 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47258
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-47258
trivy image --scanners vuln IMAGE | grep CVE-2021-47258
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/8958181c1663e24a13434448e7d6b96b5d04900a git.kernel.org
- https://git.kernel.org/stable/c/db08ce595dd64ea9859f7d088b51cbfc8e685c66 git.kernel.org
- https://git.kernel.org/stable/c/2dc85045ae65b9302a1d2e2ddd7ce4c030153a6a git.kernel.org
- https://git.kernel.org/stable/c/79296e292d67fa7b5fb8d8c27343683e823872c8 git.kernel.org
- https://git.kernel.org/stable/c/7a696ce1d5d16a33a6cd6400bbcc0339b2460e11 git.kernel.org
- https://git.kernel.org/stable/c/45d83db4728127944b237c0c8248987df9d478e7 git.kernel.org
- https://git.kernel.org/stable/c/66a834d092930cf41d809c0e989b13cd6f9ca006 git.kernel.org
Source: the record CVE-2021-47258 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse