CVE-2022-50350: scsi: target: iscsi: Fix a race condition between login_work and the login thread
In the Linux kernel, the following vulnerability has been resolved:
scsi: target: iscsi: Fix a race condition between login_work and the login thread
In case a malicious initiator sends some random data immediately after a
login PDU; the iscsi_target_sk_data_ready() callback will schedule the
login_work and, at the same time, the negotiation may end without clearing
the LOGIN_FLAGS_INITIAL_PDU flag (because no additional PDU exchanges are
required to complete the login).
The login has been completed but the login_work function will find the
LOGIN_FLAGS_INITIAL_PDU flag set and will never stop from rescheduling
itself; at this point, if the initiator drops the connection, the
iscsit_conn structure will be freed, login_work will dereference a released
socket structure and the kernel crashes.
BUG: kernel NULL pointer dereference, address: 0000000000000230
PF: supervisor write access in kernel mode
PF: error_code(0x0002) - not-present page
Workqueue: events iscsi_target_do_login_rx [iscsi_target_mod]
RIP: 0010:_raw_read_lock_bh+0x15/0x30
Call trace:
iscsi_target_do_login_rx+0x75/0x3f0 [iscsi_target_mod]
process_one_work+0x1e8/0x3c0
Fix this bug by forcing login_work to stop after the login has been
completed and the socket callbacks have been restored.
Add a comment to clearify the return values of iscsi_target_do_login()
Security readout for executives and security teams
Plain-English summary
CVE-2022-50350 is a Linux kernel iSCSI target race condition that can crash the kernel. The business impact is availability: affected storage target hosts could go down if the vulnerable login path is triggered. The sources do not show data theft, privilege escalation, or confirmed active exploitation.
Executive priority
Treat this as a moderate availability risk for Linux-based storage target systems. Patch during the next appropriate maintenance window, sooner for critical storage infrastructure exposed to many initiators or less-trusted networks.
Technical view
The flaw is in the Linux kernel SCSI target iSCSI login handling. A race between login_work and the login thread can leave LOGIN_FLAGS_INITIAL_PDU set after login completes. If the connection is dropped, login_work may dereference freed socket-related state, causing a kernel NULL pointer dereference and crash.
Likely exposure
Exposure is most relevant to Linux systems running the kernel iSCSI target functionality. The source lists affected Linux kernel versions including 3.12, 6.0.16, 6.1.2, and 6.2, but version metadata appears limited; verify against your kernel vendor.
Exploitation context
The CVSS vector is AV:L/AC:H/PR:L/UI:N with availability impact only. KEV is false, and the supplied sources do not cite active exploitation. The described trigger requires a malicious initiator and a specific race condition, so practical exploitation appears constrained.
Researcher notes
The core issue is CWE-362 race behavior in iSCSI login cleanup. The fix forces login_work to stop after login completion and socket callback restoration. The source bundle does not provide exploit artifacts, downstream distro status, or complete version range clarity.
Mitigation direction
Check your Linux distribution or kernel vendor advisory for fixed kernel packages.
Prioritize updates on hosts providing iSCSI target services.
Review the referenced upstream stable commits for patch lineage.
Restrict iSCSI target access to trusted initiators and management networks.
Monitor storage target hosts for unexpected kernel crashes or iSCSI login anomalies.
Validation and detection
Inventory Linux hosts running kernel iSCSI target services.
Map running kernel versions to vendor-fixed releases or upstream stable commits.
Confirm whether iscsi_target_mod or equivalent iSCSI target functionality is loaded.
Review kernel logs for NULL dereferences in iscsi_target_do_login_rx.
Validate that patched hosts remain stable during authorized iSCSI login testing.
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.
cwe · low confidence lookup
CWE-362: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
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.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-362 · source CWE mapping
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.