{"id":"CVE-2022-50840","aliases":["CVE-2022-50840"],"related":[],"kind":"vulnerability","state":"published","title":"scsi: snic: Fix possible UAF in snic_tgt_create()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: snic: Fix possible UAF in snic_tgt_create()\n\nSmatch reports a warning as follows:\n\ndrivers/scsi/snic/snic_disc.c:307 snic_tgt_create() warn:\n  '&tgt->list' not removed from list\n\nIf device_add() fails in snic_tgt_create(), tgt will be freed, but\ntgt->list will not be removed from snic->disc.tgt_list, then list traversal\nmay cause UAF.\n\nRemove from snic->disc.tgt_list before free().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: snic: Fix possible UAF in snic_tgt_create()\n\nSmatch reports a warning as follows:\n\ndrivers/scsi/snic/snic_disc.c:307 snic_tgt_create() warn:\n  '&tgt->list' not removed from list\n\nIf device_add() fails in snic_tgt_create(), tgt will be freed, but\ntgt->list will not be removed from snic->disc.tgt_list, then list traversal\nmay cause UAF.\n\nRemove from snic->disc.tgt_list before free().","source":"cvelist"}],"published":"2025-12-30T12:10:59.066Z","modified":"2026-06-17T05:24:16.637Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa","fixed":"f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff","status":"affected"},{"type":"git","introduced":"c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa","fixed":"3772319e40527e6a5f2ec1d729e01f271d818f5c","status":"affected"},{"type":"git","introduced":"c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa","fixed":"3007f96ca20c848d0b1b052df6d2cb5ae5586e78","status":"affected"},{"type":"git","introduced":"c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa","fixed":"6866154c23fba40888ad6d554cccd4bf2edb755e","status":"affected"},{"type":"git","introduced":"c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa","fixed":"ad27f74e901fc48729733c88818e6b96c813057d","status":"affected"},{"type":"git","introduced":"c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa","fixed":"1895e908b3ae66a5312fd1b2cdda2da82993dca7","status":"affected"},{"type":"git","introduced":"c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa","fixed":"c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc","status":"affected"},{"type":"git","introduced":"c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa","fixed":"4141cd9e8b3379aea52a85d2c35f6eaf26d14e86","status":"affected"},{"type":"git","introduced":"c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa","fixed":"e118df492320176af94deec000ae034cc92be754","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.2","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.2","status":"unaffected"},{"type":"semver","introduced":"4.9.337","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.303","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.270","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.229","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.163","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.86","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.0.16","lastAffected":"6.0.*","status":"unaffected"},{"type":"semver","introduced":"6.1.2","lastAffected":"6.1.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3772319e40527e6a5f2ec1d729e01f271d818f5c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3007f96ca20c848d0b1b052df6d2cb5ae5586e78","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6866154c23fba40888ad6d554cccd4bf2edb755e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ad27f74e901fc48729733c88818e6b96c813057d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1895e908b3ae66a5312fd1b2cdda2da82993dca7","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4141cd9e8b3379aea52a85d2c35f6eaf26d14e86","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e118df492320176af94deec000ae034cc92be754","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50840","url":"https://www.cve.org/CVERecord?id=CVE-2022-50840","licence":"CVE Terms of Use","modified":"2026-05-11T19:26:07.823Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50840","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50840","licence":"Public domain","modified":"2026-06-17T05:24:16.637Z"}],"updatedAt":"2026-11-25T22:58:21.376Z","epss":{"score":0.00304,"percentile":0.24983,"date":"2026-12-02T12:00:21.000Z"}}