CVE-2022-50215

high
Published 2023-05-09 · Modified 2023-05-09
CVSS v3
CVSS v2
VIR risk
8.0

Description

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.

Predictions

Exploit likelihood
20%
Patch ETA

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

vendor Authored 2026-05-27

Vendor advisory: debian — https://security-tracker.debian.org/tracker/CVE-2022-50215

vendor Authored 2026-05-27

Vendor advisory: suse — https://www.suse.com/security/cve/CVE-2022-50215.html

vendor Authored 2026-05-27

Vendor advisory: redhat — https://access.redhat.com/errata/RHSA-2023:2458

OS impact

OSVersionStatusFixed in
redhat rhel9fixed
suse slesaffected
debian debianbookwormfixed6.0.2-1
debian debianbullseyefixed5.10.140-1
debian debianforkyfixed6.0.2-1
debian debiansidfixed6.0.2-1
debian debiantrixiefixed6.0.2-1

References

Verify integrity in audit chain (admin only). AS-IS.