# CVE-2022-50350: scsi: target: iscsi: Fix a race condition between login\_work and the login thread

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.42% (percentile 28, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2025-09-16T16:11:42.029Z
- **Modified:** 2026-08-05T08:58:19.647Z

## Who should check

- Anyone running Linux \>= d381a8010a052813a88e20e089be4a58aad8b40a, \< 1533b8b3058db618409f41554ebe768c2e3acfae; \>= d381a8010a052813a88e20e089be4a58aad8b40a, \< 3ecdca49ca49d4770639d81503c873b6d25887c4; \>= d381a8010a052813a88e20e089be4a58aad8b40a, \< fec1b2fa62c162d03f5dcd7b03e3c89d3116d49f
- Anyone running Linux 3.12

## Description

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()

## Affected and fixed versions

- Linux: \>= d381a8010a052813a88e20e089be4a58aad8b40a, \< 1533b8b3058db618409f41554ebe768c2e3acfae; \>= d381a8010a052813a88e20e089be4a58aad8b40a, \< 3ecdca49ca49d4770639d81503c873b6d25887c4; \>= d381a8010a052813a88e20e089be4a58aad8b40a, \< fec1b2fa62c162d03f5dcd7b03e3c89d3116d49f (cvelist)
- Linux: 3.12 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50350. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50350.md
Affected: Linux >= d381a8010a052813a88e20e089be4a58aad8b40a, < 1533b8b3058db618409f41554ebe768c2e3acfae; >= d381a8010a052813a88e20e089be4a58aad8b40a, < 3ecdca49ca49d4770639d81503c873b6d25887c4; >= d381a8010a052813a88e20e089be4a58aad8b40a, < fec1b2fa62c162d03f5dcd7b03e3c89d3116d49f; Linux 3.12
Fixed in: Linux 1533b8b3058db618409f41554ebe768c2e3acfae, Linux 3ecdca49ca49d4770639d81503c873b6d25887c4

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50350 being exploited?

There is no confirmed exploitation: CVE-2022-50350 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.42% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50350?

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2022-50350?

Linux \>= d381a8010a052813a88e20e089be4a58aad8b40a, \< 1533b8b3058db618409f41554ebe768c2e3acfae; \>= d381a8010a052813a88e20e089be4a58aad8b40a, \< 3ecdca49ca49d4770639d81503c873b6d25887c4; \>= d381a8010a052813a88e20e089be4a58aad8b40a, \< fec1b2fa62c162d03f5dcd7b03e3c89d3116d49f; Linux 3.12.

### Is there a fix for CVE-2022-50350?

Yes. Fixed in Linux 1533b8b3058db618409f41554ebe768c2e3acfae, Linux 3ecdca49ca49d4770639d81503c873b6d25887c4. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50350?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/1533b8b3058db618409f41554ebe768c2e3acfae>
- patch: <https://git.kernel.org/stable/c/3ecdca49ca49d4770639d81503c873b6d25887c4>
- patch: <https://git.kernel.org/stable/c/fec1b2fa62c162d03f5dcd7b03e3c89d3116d49f>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50350>

HTML: <https://flawdb.com/CVE-2022-50350> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50350>
