scsi: snic: Fix possible memory leak if device_add() fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa · < 7723a5d5d187626c4c640842e522cf4e9e39492e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: snic: 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 give up the reference 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's snic SCSI driver can leak memory when device_add() fails after dev_set_name() allocates a name. The input does not describe how an attacker could trigger this failure or specify access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the snic SCSI driver should check their versions; affected versions are not specified.