CVE-2022-50840 (GCVE-0-2022-50840)

Vulnerability from cvelistv5 – Published: 2025-12-30 12:10 – Updated: 2025-12-30 12:10
VLAI?
Title
scsi: snic: Fix possible UAF in snic_tgt_create()
Summary
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().
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa , < f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff (git)
Affected: c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa , < 3772319e40527e6a5f2ec1d729e01f271d818f5c (git)
Affected: c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa , < 3007f96ca20c848d0b1b052df6d2cb5ae5586e78 (git)
Affected: c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa , < 6866154c23fba40888ad6d554cccd4bf2edb755e (git)
Affected: c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa , < ad27f74e901fc48729733c88818e6b96c813057d (git)
Affected: c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa , < 1895e908b3ae66a5312fd1b2cdda2da82993dca7 (git)
Affected: c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa , < c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc (git)
Affected: c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa , < 4141cd9e8b3379aea52a85d2c35f6eaf26d14e86 (git)
Affected: c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa , < e118df492320176af94deec000ae034cc92be754 (git)
Create a notification for this product.
    Linux Linux Affected: 4.2
Unaffected: 0 , < 4.2 (semver)
Unaffected: 4.9.337 , ≤ 4.9.* (semver)
Unaffected: 4.14.303 , ≤ 4.14.* (semver)
Unaffected: 4.19.270 , ≤ 4.19.* (semver)
Unaffected: 5.4.229 , ≤ 5.4.* (semver)
Unaffected: 5.10.163 , ≤ 5.10.* (semver)
Unaffected: 5.15.86 , ≤ 5.15.* (semver)
Unaffected: 6.0.16 , ≤ 6.0.* (semver)
Unaffected: 6.1.2 , ≤ 6.1.* (semver)
Unaffected: 6.2 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/scsi/snic/snic_disc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff",
              "status": "affected",
              "version": "c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa",
              "versionType": "git"
            },
            {
              "lessThan": "3772319e40527e6a5f2ec1d729e01f271d818f5c",
              "status": "affected",
              "version": "c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa",
              "versionType": "git"
            },
            {
              "lessThan": "3007f96ca20c848d0b1b052df6d2cb5ae5586e78",
              "status": "affected",
              "version": "c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa",
              "versionType": "git"
            },
            {
              "lessThan": "6866154c23fba40888ad6d554cccd4bf2edb755e",
              "status": "affected",
              "version": "c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa",
              "versionType": "git"
            },
            {
              "lessThan": "ad27f74e901fc48729733c88818e6b96c813057d",
              "status": "affected",
              "version": "c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa",
              "versionType": "git"
            },
            {
              "lessThan": "1895e908b3ae66a5312fd1b2cdda2da82993dca7",
              "status": "affected",
              "version": "c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa",
              "versionType": "git"
            },
            {
              "lessThan": "c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc",
              "status": "affected",
              "version": "c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa",
              "versionType": "git"
            },
            {
              "lessThan": "4141cd9e8b3379aea52a85d2c35f6eaf26d14e86",
              "status": "affected",
              "version": "c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa",
              "versionType": "git"
            },
            {
              "lessThan": "e118df492320176af94deec000ae034cc92be754",
              "status": "affected",
              "version": "c8806b6c9e824f47726f2a9b7fbbe7ebf19306fa",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/scsi/snic/snic_disc.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.2"
            },
            {
              "lessThan": "4.2",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.9.*",
              "status": "unaffected",
              "version": "4.9.337",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.14.*",
              "status": "unaffected",
              "version": "4.14.303",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "4.19.*",
              "status": "unaffected",
              "version": "4.19.270",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.4.*",
              "status": "unaffected",
              "version": "5.4.229",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.163",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.86",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.16",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.9.337",
                  "versionStartIncluding": "4.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.14.303",
                  "versionStartIncluding": "4.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "4.19.270",
                  "versionStartIncluding": "4.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.4.229",
                  "versionStartIncluding": "4.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.163",
                  "versionStartIncluding": "4.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.86",
                  "versionStartIncluding": "4.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.16",
                  "versionStartIncluding": "4.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.2",
                  "versionStartIncluding": "4.2",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "4.2",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "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  \u0027\u0026tgt-\u003elist\u0027 not removed from list\n\nIf device_add() fails in snic_tgt_create(), tgt will be freed, but\ntgt-\u003elist will not be removed from snic-\u003edisc.tgt_list, then list traversal\nmay cause UAF.\n\nRemove from snic-\u003edisc.tgt_list before free()."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-12-30T12:10:59.066Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff"
        },
        {
          "url": "https://git.kernel.org/stable/c/3772319e40527e6a5f2ec1d729e01f271d818f5c"
        },
        {
          "url": "https://git.kernel.org/stable/c/3007f96ca20c848d0b1b052df6d2cb5ae5586e78"
        },
        {
          "url": "https://git.kernel.org/stable/c/6866154c23fba40888ad6d554cccd4bf2edb755e"
        },
        {
          "url": "https://git.kernel.org/stable/c/ad27f74e901fc48729733c88818e6b96c813057d"
        },
        {
          "url": "https://git.kernel.org/stable/c/1895e908b3ae66a5312fd1b2cdda2da82993dca7"
        },
        {
          "url": "https://git.kernel.org/stable/c/c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc"
        },
        {
          "url": "https://git.kernel.org/stable/c/4141cd9e8b3379aea52a85d2c35f6eaf26d14e86"
        },
        {
          "url": "https://git.kernel.org/stable/c/e118df492320176af94deec000ae034cc92be754"
        }
      ],
      "title": "scsi: snic: Fix possible UAF in snic_tgt_create()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50840",
    "datePublished": "2025-12-30T12:10:59.066Z",
    "dateReserved": "2025-12-30T12:06:07.133Z",
    "dateUpdated": "2025-12-30T12:10:59.066Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-50840\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-30T13:15:58.570\",\"lastModified\":\"2025-12-31T20:43:05.160\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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  \u0027\u0026tgt-\u003elist\u0027 not removed from list\\n\\nIf device_add() fails in snic_tgt_create(), tgt will be freed, but\\ntgt-\u003elist will not be removed from snic-\u003edisc.tgt_list, then list traversal\\nmay cause UAF.\\n\\nRemove from snic-\u003edisc.tgt_list before free().\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1895e908b3ae66a5312fd1b2cdda2da82993dca7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/3007f96ca20c848d0b1b052df6d2cb5ae5586e78\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/3772319e40527e6a5f2ec1d729e01f271d818f5c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/4141cd9e8b3379aea52a85d2c35f6eaf26d14e86\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6866154c23fba40888ad6d554cccd4bf2edb755e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/ad27f74e901fc48729733c88818e6b96c813057d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c7f0f8dab1ae5def57c1a8a9cafd6fabe1dc27cc\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/e118df492320176af94deec000ae034cc92be754\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f9d8b8ba0f1a16cde0b1fc9e80466df76b6db8ff\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…