CVE-2021-47328 scsi: iscsi: Fix conn use after free during resets

Critical 9.8 Published Updated

A use-after-free vulnerability in the Linux kernel iSCSI subsystem allows attackers to execute arbitrary code or escalate privileges during resets.

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-47328?

CVE-2021-47328 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 conn use after free during resets

If we haven't done a unbind target call we can race where iscsi_conn_teardown wakes up the EH thread and then frees the conn while those threads are still accessing the conn ehwait.

We can only do one TMF per session so this just moves the TMF fields from the conn to the session. We can then rely on the iscsi_session_teardown->iscsi_remove_session->__iscsi_unbind_session call to remove the target and it's devices, and know after that point there is no device or scsi-ml callout trying to access the session.

Weakness: CWE-416

Which versions are affected by CVE-2021-47328?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47328?

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-47328 being exploited?

There is no known exploitation of CVE-2021-47328 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47328, GHSA-3whv-3wrh-jjqq, UBUNTU-CVE-2021-47328.

Is CVE-2021-47328 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free