CVE-2023-52974 scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress
A use-after-free vulnerability in the Linux kernel iSCSI TCP module allows local attackers to potentially execute code or escalate privileges during session creation failures.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-52974?
CVE-2023-52974 is a high-severity use after free vulnerability in Linux kernel, published on 27 Mar 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress
If during iscsi_sw_tcp_session_create() iscsi_tcp_r2tpool_alloc() fails, userspace could be accessing the host's ipaddress attr. If we then free the session via iscsi_session_teardown() while userspace is still accessing the session we will hit a use after free bug.
Set the tcp_sw_host->session after we have completed session creation and can no longer fail.
Weakness: CWE-416
Which versions are affected by CVE-2023-52974?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2023-52974?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2023-52974 being exploited?
There is no known exploitation of CVE-2023-52974 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2023-52974, DEBIAN-CVE-2023-52974, GHSA-wqh7-68mq-r673, UBUNTU-CVE-2023-52974.