CVE-2022-50215
Last modified
CVE-2022-50215 is a medium-severity vulnerability rated 5.5/10 on the CVSS scale. 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). EPSS estimates a 0.20% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux Kernel | < 4.9.326 |
| Linux | Linux Kernel | >= 4.10, < 4.14.291 |
| Linux | Linux Kernel | >= 4.15, < 4.19.256 |
| Linux | Linux Kernel | >= 4.20, < 5.4.211 |
| Linux | Linux Kernel | >= 5.5, < 5.10.137 |
| Linux | Linux Kernel | >= 5.11, < 5.15.61 |
| Linux | Linux Kernel | >= 5.16, < 5.18.18 |
| Linux | Linux Kernel | >= 5.19, < 5.19.2 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2022-50215?
How severe is CVE-2022-50215?
How do I fix CVE-2022-50215?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2022
- CVE-2022-50209In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2022-50210In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2022-50211In the Linux kernel, the following vulnerability has been re…7.1
- CVE-2022-50212In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2022-50213In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2022-50214In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2022-50216Rejected reason: This CVE ID has been rejected or withdrawn …
- CVE-2022-50217In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2022-50218In the Linux kernel, the following vulnerability has been re…5.5
- CVE-2022-50219In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2022-50220In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2022-50221In the Linux kernel, the following vulnerability has been re…7.1
Are you affected by CVE-2022-50215?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
