CVE-2021-47427 scsi: iscsi: Fix iscsi_task use after free
A use-after-free vulnerability in the Linux kernel's iSCSI subsystem allows attackers to potentially execute arbitrary code or escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-47427?
CVE-2021-47427 is a critical use after free vulnerability in Linux kernel, published on 21 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
scsi: iscsi: Fix iscsi_task use after free
Commit d39df158518c ("scsi: iscsi: Have abort handler get ref to conn") added iscsi_get_conn()/iscsi_put_conn() calls during abort handling but then also changed the handling of the case where we detect an already completed task where we now end up doing a goto to the common put/cleanup code. This results in a iscsi_task use after free, because the common cleanup code will do a put on the iscsi_task.
This reverts the goto and moves the iscsi_get_conn() to after we've checked if the iscsi_task is valid.
Weakness: CWE-416
Which versions are affected by CVE-2021-47427?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47427?
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-2021-47427 being exploited?
There is no known exploitation of CVE-2021-47427 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47427, GHSA-rxcf-2w24-j9pq, UBUNTU-CVE-2021-47427.