scsi: core: Fix possible memory leak if device_add() fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ ee959b00c335d7780136c5abda37809191fe52c3 · < b191ff1f075c4875f11271cbf0093e6e044a12aa| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: core: Fix possible memory leak if device_add() fails
If device_add() returns error, the name allocated by dev_set_name() needs be freed. As the comment of device_add() says, put_device() should be used to decrease the reference count in the error path. So fix this by calling put_device(), then the name can be freed in kobject_cleanp().
From the CVE record · Linux
The Linux kernel SCSI core can leak memory allocated for a device name if device_add() fails. The input does not describe how an attacker could trigger this failure or specify access or user-interaction requirements.
Engineers running the Linux kernel should check their systems; affected versions are not specified.