cve.bz

CVE-2023-53586 linux linux kernel: Double Free

4.7 mediumEPSS 0.5%Fix available

Medium (4.7) in linux linux kernel. EPSS 0.5% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: scsi: target: Fix multiple LUN_RESET handling This fixes a bug where an initiator thinks a LUN_RESET has cleaned up running commands when it hasn't. The bug was added in commit 51ec502a3266 ("target: Delete tmr from list before processing"). The problem occurs when: 1. We have N I/O cmds running in the target layer spread over 2 sessions. 2. The initiator sends a LUN_RESET for each session. 3. session1's LUN_RESET loops over all the running commands from both sessions and moves them to its local drain_task_list. 4. session2's LUN_RESET does not see the LUN_RESET from session1 because the commit above has it remove itself. session2 also does not see any commands since the other reset moved them off the state lists. 5. sessions2's LUN_RESET will then complete with a successful response. 6. sessions2's inititor believes the running commands on its session are now cleaned up due to the successful response and cleans up the running commands from its side. It then restarts them. 7. The commands do eventually complete on the backend and the target starts to return aborted task statuses for them. The initiator will either throw a invalid ITT error or might accidentally lookup a new task if the ITT has been reallocated already. Fix the bug by reverting the patch, and serialize the execution of LUN_RESETs and Preempt and Aborts. Also prevent us from waiting on LUN_RESETs in core_tmr_drain_tmr_list, because it turns out the original patch fixed a bug that was not mentioned. For LUN_RESET1 core_tmr_drain_tmr_list can see a second LUN_RESET and wait on it. Then the second reset will run core_tmr_drain_tmr_list and see the first reset and wait on it resulting in a deadlock.

Severity

CVSS 3.1

4.7 medium
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.5% (unchanged from 0.5% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 41st percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-415 Double Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-53586 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-53586?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-53586?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-53586 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux4.11 and later

Fixed in

ProductRelease lineFixed in
Linux5.105.10.180
Linux5.155.15.111
Linux6.16.1.28
Linux6.26.2.15
Linux6.36.3.2
Linuxlater releases6.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linux6.1.37-1DEBIAN-CVE-2023-53586
Debian13, 14linux6.3.7-1DEBIAN-CVE-2023-53586
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2023-53586
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-aws-5.155.15.0-1041.46~20.04.1UBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-azure-5.155.15.0-1045.52~20.04.1UBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-gcp-5.155.15.0-1039.47~20.04.1UBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-hwe-5.155.15.0-79.86~20.04.2UBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-ibm-5.155.15.0-1036.39~20.04.1UBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-intel-iotg-5.155.15.0-1037.42~20.04.1UBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-lowlatency-hwe-5.155.15.0-79.88~20.04.1UBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-nvidia-tegra-5.155.15.0-1016.16~20.04.1UBUNTU-CVE-2023-53586
Ubuntu20.04:LTSlinux-oracle-5.155.15.0-1040.46~20.04.1UBUNTU-CVE-2023-53586
27 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:8::baseosperf, kernel, bpftool and 30 more0:4.18.0-553.el8_10RHSA-2024:3138
Red Hatenterprise_linux:8::crbperf-debuginfo, kernel-debuginfo, bpftool-debuginfo and 7 more0:4.18.0-553.el8_10RHSA-2024:3138
Red Hatenterprise_linux:9::appstreamrv, perf, rtla and 26 more0:5.14.0-427.13.1.el9_4RHSA-2024:2394
Red Hatenterprise_linux:9::appstream, enterprise_linux:9::crb, enterprise_linux:9::nfv and 1 morebpftool-debuginfo0:7.3.0-427.13.1.el9_4RHSA-2024:2394
Red Hatenterprise_linux:9::baseosbpftool, bpftool-debuginfo0:7.3.0-427.13.1.el9_4RHSA-2024:2394
Red Hatenterprise_linux:9::baseoskernel, kernel-64k, kernel-core and 43 more0:5.14.0-427.13.1.el9_4RHSA-2024:2394
Red Hatenterprise_linux:9::crblibperf, perf-debuginfo, kernel-debuginfo and 14 more0:5.14.0-427.13.1.el9_4RHSA-2024:2394
Red Hatenterprise_linux:9::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 20 more0:5.14.0-427.13.1.el9_4RHSA-2024:2394
Red Hatenterprise_linux:9::realtimekernel-rt, kernel-rt-core, perf-debuginfo and 18 more0:5.14.0-427.13.1.el9_4RHSA-2024:2394
Rocky Linux8kernel0:4.18.0-553.123.1.el8_10.cloud.0.1RXSA-2024:3138
Alpaquitastreamlinux-lts6.6.58-r0BELL-CVE-2023-53586

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; Rocky Linux's errata, BSD-3-Clause; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · Alpaquita.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

The issue arises because LUN_RESET operations from different sessions aren't properly serialized. When session1's LUN_RESET begins processing, it moves all running commands (from both sessions) to its local drain_task_list. Meanwhile, session2's LUN_RESET doesn't see session1's reset operation (because it removed itself from the TMR list) and doesn't see any commands (because session1 moved them). Session2 then incorrectly reports success to its initiator. The initiator believes its commands are aborted and reissues them, but the backend eventually completes the original commands, returning aborted task statuses. The initiator then encounters invalid ITT errors or accidentally looks up reused ITTs. This can cause I/O errors and potential data corruption if reissued commands overlap with still-executing original commands. The race requires precise timing between multiple sessions sending LUN_RESET commands concurrently.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8kernel-0:4.18.0-553.el8_10Fixed 2024-05-22RHSA-2024:3138
Red Hat Enterprise Linux 9kernel-0:5.14.0-427.13.1.el9_4Fixed 2024-04-30RHSA-2024:2394
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelFix deferred
Red Hat Enterprise Linux 7kernel-rtFix deferred
Red Hat Enterprise Linux 8kernel-rtFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-53586.

References

Check your stackJSON