{"id":"CVE-2021-47258","aliases":["CVE-2021-47258"],"related":[],"kind":"vulnerability","state":"published","title":"scsi: core: Fix error handling of scsi_host_alloc()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: core: Fix error handling of scsi_host_alloc()\n\nAfter device is initialized via device_initialize(), or its name is set via\ndev_set_name(), the device has to be freed via put_device().  Otherwise\ndevice name will be leaked because it is allocated dynamically in\ndev_set_name().\n\nFix the leak by replacing kfree() with put_device(). Since\nscsi_host_dev_release() properly handles IDA and kthread removal, remove\nspecial-casing these from the error handling as well.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: core: Fix error handling of scsi_host_alloc()\n\nAfter device is initialized via device_initialize(), or its name is set via\ndev_set_name(), the device has to be freed via put_device().  Otherwise\ndevice name will be leaked because it is allocated dynamically in\ndev_set_name().\n\nFix the leak by replacing kfree() with put_device(). Since\nscsi_host_dev_release() properly handles IDA and kthread removal, remove\nspecial-casing these from the error handling as well.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: scsi: core: corrige el manejo de errores de scsi_host_alloc(). Después de que el dispositivo se inicializa mediante device_initialize(), o su nombre se establece mediante dev_set_name(), el dispositivo debe liberarse mediante put_device (). De lo contrario, se filtrará el nombre del dispositivo porque se asigna dinámicamente en dev_set_name(). Solucione la fuga reemplazando kfree() con put_device(). Dado que scsi_host_dev_release() maneja adecuadamente la eliminación de IDA y kthread, elimine también estas mayúsculas y minúsculas especiales del manejo de errores.","source":"nvd"}],"published":"2024-05-21T14:19:52.082Z","modified":"2026-06-17T04:17:02.023Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-401"],"affected":[{"ranges":[{"type":"git","introduced":"1fa5ae857bb14f6046205171d98506d8112dd74e","fixed":"8958181c1663e24a13434448e7d6b96b5d04900a","status":"affected"},{"type":"git","introduced":"1fa5ae857bb14f6046205171d98506d8112dd74e","fixed":"db08ce595dd64ea9859f7d088b51cbfc8e685c66","status":"affected"},{"type":"git","introduced":"1fa5ae857bb14f6046205171d98506d8112dd74e","fixed":"2dc85045ae65b9302a1d2e2ddd7ce4c030153a6a","status":"affected"},{"type":"git","introduced":"1fa5ae857bb14f6046205171d98506d8112dd74e","fixed":"79296e292d67fa7b5fb8d8c27343683e823872c8","status":"affected"},{"type":"git","introduced":"1fa5ae857bb14f6046205171d98506d8112dd74e","fixed":"7a696ce1d5d16a33a6cd6400bbcc0339b2460e11","status":"affected"},{"type":"git","introduced":"1fa5ae857bb14f6046205171d98506d8112dd74e","fixed":"45d83db4728127944b237c0c8248987df9d478e7","status":"affected"},{"type":"git","introduced":"1fa5ae857bb14f6046205171d98506d8112dd74e","fixed":"66a834d092930cf41d809c0e989b13cd6f9ca006","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.30","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.30","status":"unaffected"},{"type":"semver","introduced":"4.9.273","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.237","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.195","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.126","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.44","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.12.11","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"4.9.273"},{"status":"affected","introduced":"4.10","fixed":"4.14.237"},{"status":"affected","introduced":"4.15","fixed":"4.19.195"},{"status":"affected","introduced":"4.20","fixed":"5.4.126"},{"status":"affected","introduced":"5.5","fixed":"5.10.44"},{"status":"affected","introduced":"5.11","fixed":"5.12.11"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"},{"status":"affected","version":"5.13"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/8958181c1663e24a13434448e7d6b96b5d04900a","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/db08ce595dd64ea9859f7d088b51cbfc8e685c66","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2dc85045ae65b9302a1d2e2ddd7ce4c030153a6a","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/79296e292d67fa7b5fb8d8c27343683e823872c8","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7a696ce1d5d16a33a6cd6400bbcc0339b2460e11","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/45d83db4728127944b237c0c8248987df9d478e7","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/66a834d092930cf41d809c0e989b13cd6f9ca006","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-05-23T18:04:09.968Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-47258","url":"https://www.cve.org/CVERecord?id=CVE-2021-47258","licence":"CVE Terms of Use","modified":"2026-05-11T13:51:01.386Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-47258","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-47258","licence":"Public domain","modified":"2026-06-17T04:17:02.023Z"}],"updatedAt":"2026-11-25T22:58:08.761Z","epss":{"score":0.00236,"percentile":0.15661,"date":"2026-12-01T12:00:22.000Z"}}