LiveActive security incident?Get immediate response
CVE Record

CVE-2022-50215: scsi: sg: Allow waiting for commands to complete on removed device

In the Linux kernel, the following vulnerability has been resolved: scsi: sg: Allow waiting for commands to complete on removed device When a SCSI device is removed while in active use, currently sg will immediately return -ENODEV on any attempt to wait for active commands that were sent before the removal. This is problematic for commands that use SG_FLAG_DIRECT_IO since the data buffer may still be in use by the kernel when userspace frees or reuses it after getting ENODEV, leading to corrupted userspace memory (in the case of READ-type commands) or corrupted data being sent to the device (in the case of WRITE-type commands). This has been seen in practice when logging out of a iscsi_tcp session, where the iSCSI driver may still be processing commands after the device has been marked for removal. Change the policy to allow userspace to wait for active sg commands even when the device is being removed. Return -ENODEV only when there are no more responses to read.

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2022-50215 is a Linux kernel SCSI generic driver issue. If a SCSI device is removed while commands are still active, userspace can be told the device is gone while the kernel still uses the buffer, risking userspace memory corruption or incorrect data sent to storage.

Executive priority

Treat as a focused storage integrity risk. Prioritize patching storage-heavy Linux hosts, iSCSI environments, and systems where corrupted buffers or writes could affect business-critical data.

Technical view

The sg driver previously returned ENODEV immediately when waiting on pre-removal commands. For SG_FLAG_DIRECT_IO commands, buffers could still be in kernel use after userspace freed or reused them. The fix allows waiting for active sg commands during removal and returns ENODEV only after no responses remain.

Likely exposure

Exposure is most likely on Linux systems using SCSI generic devices with direct I/O during device removal. The source specifically notes this was seen during iscsi_tcp logout. Affected version data is kernel-level and may vary by distribution backports.

Exploitation context

The provided sources do not show active exploitation, public exploit availability, or KEV listing. The issue appears reliability- and integrity-impacting in a specific storage I/O race condition rather than a broadly exposed remote attack path.

Researcher notes

Evidence is limited to the CVE record and kernel stable references. No CVSS, CWE, exploit status, or distribution-specific package matrix is provided. The root condition is a device-removal race around sg command completion and SG_FLAG_DIRECT_IO buffer lifetime.

Mitigation direction

  • Apply kernel updates from the relevant Linux distribution or vendor.
  • Confirm the vendor kernel includes the referenced stable sg fix.
  • Prioritize systems using SCSI generic, direct I/O, or iSCSI workflows.
  • Check vendor guidance if no package fix is available.
  • Avoid disruptive SCSI or iSCSI removals until patched where operationally feasible.

Validation and detection

  • Inventory Linux kernel versions across systems with SCSI or iSCSI usage.
  • Check distribution advisories for CVE-2022-50215 remediation status.
  • Verify whether workloads use sg devices with direct I/O.
  • Review storage logout or device-removal incidents for related corruption symptoms.
  • Confirm patched kernels include one of the referenced stable commits.
Prepared
Confidence
medium
Sources
11

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2022-50215 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
3Timeline events
0ADP providers
10Source links

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinuxc6517b7942fad663cc1cf3235cbe4207cf769332, c6517b7942fad663cc1cf3235cbe4207cf769332, c6517b7942fad663cc1cf3235cbe4207cf769332, c6517b7942fad663cc1cf3235cbe4207cf769332, c6517b7942fad663cc1cf3235cbe4207cf769332, c6517b7942fad663cc1cf3235cbe4207cf769332, c6517b7942fad663cc1cf3235cbe4207cf769332, c6517b7942fad663cc1cf3235cbe4207cf769332, c6517b7942fad663cc1cf3235cbe4207cf769332, a0fe972f78eaaf352d593f9ed9079de590ceb286, b21c6d2897cd455fa396f4041a0c8165784e949funaffected
LinuxLinux2.6.30, 0, 4.9.326, 4.14.291, 4.19.256, 5.4.211, 5.10.137, 5.15.61, 5.18.18, 5.19.2, 6.0affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.