scsi: core: Fix error handling of scsi_host_alloc()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1fa5ae857bb14f6046205171d98506d8112dd74e · < 45d83db4728127944b237c0c8248987df9d478e7| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel's SCSI core can leak a dynamically allocated device name when scsi_host_alloc() error handling frees an initialized device incorrectly. The input does not describe how an attacker could trigger the error or specify access or user-interaction requirements.
Engineers running the Linux kernel should check their systems; affected versions are not specified.