# CVE-2021-47427: scsi: iscsi: Fix iscsi_task use after free

- Severity: Critical 9.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.46%, higher than 41% of CVEs (2026-12-01)
- Published: 2024-05-21T15:04:13.244Z
- Modified: 2026-08-05T08:47:46.574Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from d39df158518ccc3bf24ee18082b5e100c8f014aa before 1642f51ac0d4f2b55d5748094c49ff8f7191b93c; from d39df158518ccc3bf24ee18082b5e100c8f014aa before 258aad75c62146453d03028a44f2f1590d58e1f6; 5.14 (not affected: before 5.14; from 5.14.12 up to 5.14.*; from 5.15 up to *)
- linux linux_kernel: from 5.14 before 5.14.12; 5.15

## Every score

- Linux: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/1642f51ac0d4f2b55d5748094c49ff8f7191b93c> (patch)
- <https://git.kernel.org/stable/c/258aad75c62146453d03028a44f2f1590d58e1f6> (patch)

## Sources

- CVE List: [CVE-2021-47427](https://www.cve.org/CVERecord?id=CVE-2021-47427), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2021-47427](https://nvd.nist.gov/vuln/detail/CVE-2021-47427), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2021-47427 · Whole record: https://cve.day/CVE-2021-47427.json · Rebuilt by cve.day 2026-11-25T22:58:08.851Z
