In the Linux kernel, the following vulnerability has been resolved:
scsi: snic: Fix possible UAF in snictgtcreate()
Smatch reports a warning as follows:
drivers/scsi/snic/snicdisc.c:307 snictgt_create() warn: '&tgt->list' not removed from list
If deviceadd() fails in snictgtcreate(), tgt will be freed, but tgt->list will not be removed from snic->disc.tgtlist, then list traversal may cause UAF.
Remove from snic->disc.tgt_list before free().
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50840.json",
"cna_assigner": "Linux"
}