scsi: snic: Fix possible UAF in snic_tgt_create()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa · < 1895e908b3ae66a5312fd1b2cdda2da82993dca7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: snic: Fix possible UAF in snic_tgt_create()
Smatch reports a warning as follows:
drivers/scsi/snic/snic_disc.c:307 snic_tgt_create() warn: '&tgt->list' not removed from list
If device_add() fails in snic_tgt_create(), tgt will be freed, but tgt->list will not be removed from snic->disc.tgt_list, then list traversal may cause UAF.
Remove from snic->disc.tgt_list before free().
From the CVE record · Linux
The Linux kernel's snic SCSI driver can leave a freed target on a list if device_add() fails during snic_tgt_create(). Later list traversal may cause a use-after-free. The input does not establish an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels that include the snic SCSI driver should check their kernel's status; affected versions are not specified.