# CVE-2022-50840: scsi: snic: Fix possible UAF in snic\_tgt\_create()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **Published:** 2025-12-30T12:10:59.066Z
- **Modified:** 2026-06-17T05:24:16.637Z

## Who should check

- Anyone running Linux \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 3772319e40527e6a5f2ec1d729e01f271d818f5c; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 3007f96ca20c848d0b1b052df6d2cb5ae5586e78; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 6866154c23fba40888ad6d554cccd4bf2edb755e; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< ad27f74e901fc48729733c88818e6b96c813057d; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 1895e908b3ae66a5312fd1b2cdda2da82993dca7; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 4141cd9e8b3379aea52a85d2c35f6eaf26d14e86; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< e118df492320176af94deec000ae034cc92be754
- Anyone running Linux 4.2

## Description

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().

## Affected and fixed versions

- Linux: \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 3772319e40527e6a5f2ec1d729e01f271d818f5c; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 3007f96ca20c848d0b1b052df6d2cb5ae5586e78; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 6866154c23fba40888ad6d554cccd4bf2edb755e; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< ad27f74e901fc48729733c88818e6b96c813057d; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 1895e908b3ae66a5312fd1b2cdda2da82993dca7; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 4141cd9e8b3379aea52a85d2c35f6eaf26d14e86; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< e118df492320176af94deec000ae034cc92be754 (cvelist)
- Linux: 4.2 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50840. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50840.md
Affected: Linux >= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, < f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff; >= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, < 3772319e40527e6a5f2ec1d729e01f271d818f5c; >= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, < 3007f96ca20c848d0b1b052df6d2cb5ae5586e78; >= c8806b6c9e824f47726f2a9…
Fixed in: Linux 3772319e40527e6a5f2ec1d729e01f271d818f5c, Linux 3007f96ca20c848d0b1b052df6d2cb5ae5586e78, Linux 6866154c23fba40888ad6d554cccd4bf2edb755e, Linux 1895e908b3ae66a5312fd1b2cdda2da82993dca7, Linux 4141cd9e8b3379aea52a85d2c35f6eaf26d14e86

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50840 being exploited?

There is no confirmed exploitation: CVE-2022-50840 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50840?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2022-50840?

Linux \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 3772319e40527e6a5f2ec1d729e01f271d818f5c; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 3007f96ca20c848d0b1b052df6d2cb5ae5586e78; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 6866154c23fba40888ad6d554cccd4bf2edb755e; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< ad27f74e901fc48729733c88818e6b96c813057d; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 1895e908b3ae66a5312fd1b2cdda2da82993dca7; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< 4141cd9e8b3379aea52a85d2c35f6eaf26d14e86; \>= c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa, \< e118df492320176af94deec000ae034cc92be754; Linux 4.2.

### Is there a fix for CVE-2022-50840?

Yes. Fixed in Linux 3772319e40527e6a5f2ec1d729e01f271d818f5c, Linux 3007f96ca20c848d0b1b052df6d2cb5ae5586e78, Linux 6866154c23fba40888ad6d554cccd4bf2edb755e, Linux 1895e908b3ae66a5312fd1b2cdda2da82993dca7, Linux 4141cd9e8b3379aea52a85d2c35f6eaf26d14e86. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50840?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff>
- other: <https://git.kernel.org/stable/c/3772319e40527e6a5f2ec1d729e01f271d818f5c>
- other: <https://git.kernel.org/stable/c/3007f96ca20c848d0b1b052df6d2cb5ae5586e78>
- other: <https://git.kernel.org/stable/c/6866154c23fba40888ad6d554cccd4bf2edb755e>
- other: <https://git.kernel.org/stable/c/ad27f74e901fc48729733c88818e6b96c813057d>
- other: <https://git.kernel.org/stable/c/1895e908b3ae66a5312fd1b2cdda2da82993dca7>
- other: <https://git.kernel.org/stable/c/c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc>
- other: <https://git.kernel.org/stable/c/4141cd9e8b3379aea52a85d2c35f6eaf26d14e86>
- other: <https://git.kernel.org/stable/c/e118df492320176af94deec000ae034cc92be754>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50840>

HTML: <https://flawdb.com/CVE-2022-50840> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50840>
