{
  "schemaVersion": 1,
  "attribution": [
    {
      "source": "CISA Known Exploited Vulnerabilities",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog",
      "licence": "US government work"
    },
    {
      "source": "GitHub Advisory Database",
      "url": "https://github.com/advisories",
      "licence": "CC BY 4.0"
    },
    {
      "source": "Have I Been Pwned",
      "url": "https://haveibeenpwned.com/",
      "licence": "CC BY 4.0"
    },
    {
      "source": "CVE Program (CVE records)",
      "url": "https://www.cve.org/Legal/TermsOfUse",
      "licence": "CVE Terms of Use",
      "notice": "Copyright © 1999-2026, The MITRE Corporation. CVE is a trademark and the CVE logo is a registered trademark of The MITRE Corporation.",
      "terms": "CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy."
    },
    {
      "source": "FIRST EPSS",
      "url": "https://www.first.org/epss/",
      "licence": "free to use; FIRST requests attribution"
    }
  ],
  "record": {
    "id": "CVE-2022-50215",
    "sourceURL": "https://www.cve.org/CVERecord?id=CVE-2022-50215",
    "idYear": 2022,
    "status": "PUBLISHED",
    "publishedAt": "2025-06-18T11:03:52.197Z",
    "updatedAt": "2026-10-15T21:31:18.993Z",
    "importedAt": "2026-10-24T01:56:49.724Z",
    "snapshot": {
      "id": "cve_2026-10-24_midnight_baseline",
      "at": "2026-10-24T00:00:00.000Z",
      "source": "https://github.com/CVEProject/cvelistV5/releases/tag/cve_2026-10-24_0100Z"
    },
    "facts": {
      "title": "scsi: sg: Allow waiting for commands to complete on removed device",
      "summary": "In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: sg: Allow waiting for commands to complete on removed device\n\nWhen a SCSI device is removed while in active use, currently sg will\nimmediately return -ENODEV on any attempt to wait for active commands that\nwere sent before the removal.  This is problematic for commands that use\nSG_FLAG_DIRECT_IO since the data buffer may still be in use by the kernel\nwhen userspace frees or reuses it after getting ENODEV, leading to\ncorrupted userspace memory (in the case of READ-type commands) or corrupted\ndata being sent to the device (in the case of WRITE-type commands).  This\nhas been seen in practice when logging out of a iscsi_tcp session, where\nthe iSCSI driver may still be processing commands after the device has been\nmarked for removal.\n\nChange the policy to allow userspace to wait for active sg commands even\nwhen the device is being removed.  Return -ENODEV only when there are no\nmore responses to read.",
      "affected": [
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "c6517b7942fad663cc1cf3235cbe4207cf769332",
              "status": "affected",
              "versionType": "git",
              "lessThan": "bbc118acf7baf9e93c5e1314d14f481301af4d0f"
            },
            {
              "version": "c6517b7942fad663cc1cf3235cbe4207cf769332",
              "status": "affected",
              "versionType": "git",
              "lessThan": "f5e61d9b4a699dd16f32d5f39eb1cf98d84c92ed"
            },
            {
              "version": "c6517b7942fad663cc1cf3235cbe4207cf769332",
              "status": "affected",
              "versionType": "git",
              "lessThan": "ed9afd967cbfe7da2dc0d5e52c62a778dfe9f16b"
            },
            {
              "version": "c6517b7942fad663cc1cf3235cbe4207cf769332",
              "status": "affected",
              "versionType": "git",
              "lessThan": "f135c65085eed869d10e4e7923ce1015288618da"
            },
            {
              "version": "c6517b7942fad663cc1cf3235cbe4207cf769332",
              "status": "affected",
              "versionType": "git",
              "lessThan": "408bfa1489a3cfe7150b81ab0b0df99b23dd5411"
            },
            {
              "version": "c6517b7942fad663cc1cf3235cbe4207cf769332",
              "status": "affected",
              "versionType": "git",
              "lessThan": "8c004b7dbb340c1e5889f5fb9e5baa6f6e5303e8"
            },
            {
              "version": "c6517b7942fad663cc1cf3235cbe4207cf769332",
              "status": "affected",
              "versionType": "git",
              "lessThan": "35e60ec39e862159cb92923eefd5230d4a873cb9"
            },
            {
              "version": "c6517b7942fad663cc1cf3235cbe4207cf769332",
              "status": "affected",
              "versionType": "git",
              "lessThan": "03d8241112d5e3cccce1a01274a221099f07d2e1"
            },
            {
              "version": "c6517b7942fad663cc1cf3235cbe4207cf769332",
              "status": "affected",
              "versionType": "git",
              "lessThan": "3455607fd7be10b449f5135c00dc306b85dc0d21"
            },
            {
              "version": "a0fe972f78eaaf352d593f9ed9079de590ceb286",
              "status": "affected",
              "versionType": "git"
            },
            {
              "version": "b21c6d2897cd455fa396f4041a0c8165784e949f",
              "status": "affected",
              "versionType": "git"
            },
            {
              "version": "2.6.28.10",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "2.6.29"
            },
            {
              "version": "2.6.29.2",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "2.6.30"
            }
          ]
        },
        {
          "vendor": "Linux",
          "product": "Linux",
          "defaultStatus": "affected",
          "versions": [
            {
              "version": "2.6.30",
              "status": "affected"
            },
            {
              "version": "0",
              "status": "unaffected",
              "versionType": "semver",
              "lessThan": "2.6.30"
            },
            {
              "version": "4.9.326",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "4.9.*"
            },
            {
              "version": "4.14.291",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "4.14.*"
            },
            {
              "version": "4.19.256",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "4.19.*"
            },
            {
              "version": "5.4.211",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.4.*"
            },
            {
              "version": "5.10.137",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.10.*"
            },
            {
              "version": "5.15.61",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.15.*"
            },
            {
              "version": "5.18.18",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.18.*"
            },
            {
              "version": "5.19.2",
              "status": "unaffected",
              "versionType": "semver",
              "lessThanOrEqual": "5.19.*"
            },
            {
              "version": "6.0",
              "status": "unaffected",
              "versionType": "original_commit_for_fix",
              "lessThanOrEqual": "*"
            }
          ]
        }
      ]
    }
  }
}