# CVE-2023-54184: scsi: target: iscsit: Free cmds before session free

> A use-after-free vulnerability in the Linux kernel iSCSI target allows attackers to cause a denial of service via a NULL pointer dereference.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 30 Dec 2025
- **Updated:** 5 Aug 2026
- **Also known as:** BELL-CVE-2023-54184, DEBIAN-CVE-2023-54184, GHSA-mhc4-7fcr-wrj3, UBUNTU-CVE-2023-54184

## What is CVE-2023-54184?

CVE-2023-54184 is a critical use after free vulnerability in Linux, published on 30 Dec 2025. 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: target: iscsit: Free cmds before session free

Commands from recovery entries are freed after session has been closed.
That leads to use-after-free at command free or NPE with such call trace:

Time2Retain timer expired for SID: 1, cleaning up iSCSI session.
BUG: kernel NULL pointer dereference, address: 0000000000000140
RIP: 0010:sbitmap_queue_clear+0x3a/0xa0
Call Trace:
 target_release_cmd_kref+0xd1/0x1f0 [target_core_mod]
 transport_generic_free_cmd+0xd1/0x180 [target_core_mod]
 iscsit_free_cmd+0x53/0xd0 [iscsi_target_mod]
 iscsit_free_connection_recovery_entries+0x29d/0x320 [iscsi_target_mod]
 iscsit_close_session+0x13a/0x140 [iscsi_target_mod]
 iscsit_check_post_dataout+0x440/0x440 [iscsi_target_mod]
 call_timer_fn+0x24/0x140

Move cleanup of recovery enrties to before session freeing.

## Which versions are affected by CVE-2023-54184?


## How do I fix CVE-2023-54184?

Apply the vendor's patch.

## Is CVE-2023-54184 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-54184 and fix it if it is affected.

What it is: CVE-2023-54184 is a critical use after free vulnerability in Linux, published on 30 Dec 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-54184 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-54184/ (Markdown: https://insights.sbomify.com/CVE-2023-54184/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-54184
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-54184
- OSV: https://osv.dev/vulnerability/CVE-2023-54184

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-54184/
Summaries are generated and may contain mistakes; the official description above is the record.
