CVE-2022-50459: scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()
In the Linux kernel, the following vulnerability has been resolved:
scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()
Fix a NULL pointer crash that occurs when we are freeing the socket at the
same time we access it via sysfs.
The problem is that:
1. iscsi_sw_tcp_conn_get_param() and iscsi_sw_tcp_host_get_param() take
the frwd_lock and do sock_hold() then drop the frwd_lock. sock_hold()
does a get on the "struct sock".
2. iscsi_sw_tcp_release_conn() does sockfd_put() which does the last put
on the "struct socket" and that does __sock_release() which sets the
sock->ops to NULL.
3. iscsi_sw_tcp_conn_get_param() and iscsi_sw_tcp_host_get_param() then
call kernel_getpeername() which accesses the NULL sock->ops.
Above we do a get on the "struct sock", but we needed a get on the "struct
socket". Originally, we just held the frwd_lock the entire time but in
commit bcf3a2953d36 ("scsi: iscsi: iscsi_tcp: Avoid holding spinlock while
calling getpeername()") we switched to refcount based because the network
layer changed and started taking a mutex in that path, so we could no
longer hold the frwd_lock.
Instead of trying to maintain multiple refcounts, this just has us use a
mutex for accessing the socket in the interface code paths.
Security readout for executives and security teams
Plain-English summary
CVE-2022-50459 is a Linux kernel crash bug in the iSCSI TCP storage code. A race can occur when the kernel frees a socket while another path reads connection details through sysfs, causing a NULL pointer dereference. The public record does not provide CVSS, confirmed impact beyond crash, or active exploitation evidence.
Executive priority
Treat as a stability and availability risk for Linux systems using iSCSI TCP. Prioritize storage-dependent servers where a kernel crash could interrupt critical services. Urgency is constrained by missing severity scoring and no confirmed exploitation in the supplied sources.
Technical view
The issue is in iscsi_tcp interface paths calling getpeername(). Code held a reference to struct sock, but release could drop the final struct socket reference and set sock->ops to NULL. Later kernel_getpeername() dereferenced that NULL ops pointer. The fix uses a mutex for socket access in these paths.
Likely exposure
Exposure appears limited to Linux systems running affected kernels with the software iSCSI TCP driver path relevant to their storage configuration. The bundle lists affected Linux versions including 5.9, 5.10.150, 5.15.75, 5.19.17, 6.0.3, and 6.1, but distribution backports must be checked.
Exploitation context
CISA KEV status is false in the supplied bundle, and no cited source reports active exploitation. The described behavior is a kernel NULL pointer crash during a race between socket release and sysfs parameter access. Public evidence does not establish remote exploitability or privilege requirements.
Researcher notes
Key uncertainty is exploitability. The source describes a race-triggered NULL pointer dereference, not a privilege escalation or code execution path. Researchers should focus on affected kernel lineage, iSCSI TCP usage, sysfs access context, and whether downstream vendors backported the mutex-based fix.
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-50459 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
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
6Source links
Vulnerability timeline
Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.
CVE reservedCVE Program
The CVE ID was reserved by the assigning CNA.
CVE publishedCVE Program
The CVE record was published.
Oct 1, 2025, 11:45 UTC (UTC+00:00)
CVE updatedCVE Program
The CVE record metadata indicates this as the latest update time.