{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-53586","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-10-04T15:40:38.477Z","datePublished":"2025-10-04T15:44:01.809Z","dateUpdated":"2026-08-05T09:14:57.558Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T09:14:57.558Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: target: Fix multiple LUN_RESET handling\n\nThis fixes a bug where an initiator thinks a LUN_RESET has cleaned up\nrunning commands when it hasn't. The bug was added in commit 51ec502a3266\n(\"target: Delete tmr from list before processing\").\n\nThe problem occurs when:\n\n 1. We have N I/O cmds running in the target layer spread over 2 sessions.\n\n 2. The initiator sends a LUN_RESET for each session.\n\n 3. session1's LUN_RESET loops over all the running commands from both\n    sessions and moves them to its local drain_task_list.\n\n 4. session2's LUN_RESET does not see the LUN_RESET from session1 because\n    the commit above has it remove itself. session2 also does not see any\n    commands since the other reset moved them off the state lists.\n\n 5. sessions2's LUN_RESET will then complete with a successful response.\n\n 6. sessions2's inititor believes the running commands on its session are\n    now cleaned up due to the successful response and cleans up the running\n    commands from its side. It then restarts them.\n\n 7. The commands do eventually complete on the backend and the target\n    starts to return aborted task statuses for them. The initiator will\n    either throw a invalid ITT error or might accidentally lookup a new\n    task if the ITT has been reallocated already.\n\nFix the bug by reverting the patch, and serialize the execution of\nLUN_RESETs and Preempt and Aborts.\n\nAlso prevent us from waiting on LUN_RESETs in core_tmr_drain_tmr_list,\nbecause it turns out the original patch fixed a bug that was not\nmentioned. For LUN_RESET1 core_tmr_drain_tmr_list can see a second\nLUN_RESET and wait on it. Then the second reset will run\ncore_tmr_drain_tmr_list and see the first reset and wait on it resulting in\na deadlock."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable code is the LIO SCSI target core, and LUN_RESET task management functions are delivered by a remote initiator over the network — `iscsit_handle_task_mgt_cmd()` on TCP/3260, plus `ib_srpt` (IB/RoCE) and FC/FCoE fabrics. No local access to the target host is needed.\nAC:L - The attacker controls both sides of the race: it issues the in-flight I/O and both concurrent LUN_RESET TMFs (from one or two sessions), which are dispatched to separate workqueue contexts, and it can repeat the attempt indefinitely until the window is hit.\nPR:L - TMF PDUs are only processed in iSCSI full-feature phase, so the attacker needs an established session with a mapped LUN; LIO defaults to `authentication=1` (CHAP) with explicit ACLs, so this is an ordinary authorized-but-unprivileged initiator, not an unauthenticated peer.\nUI:N - Exploitation requires only that the attacker send SCSI commands and LUN_RESET TMFs on its own session; no action by any administrator or other user of the target is needed.\nS:U - The list corruption and use-after-free occur in the target host's own kernel, within the same security authority as the vulnerable component; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The unsynchronized `drain_tmr_list` walk can iterate a freed `se_tmr_req`/`se_cmd`, and a use-after-free of these heap objects gives an attacker who reclaims the slab a read primitive over kernel memory; additionally, status/data for a stale ITT can be delivered against a reallocated task, exposing one command's results to another.\nI:H - The kref underflow and use-after-free on `se_cmd` allow writes into reclaimed kernel memory (e.g. `cmd->abrt_compl`), a control-flow-relevant corruption primitive; independently, the premature TMR_FUNCTION_COMPLETE causes the initiator to reissue commands that are still executing on the backend, silently corrupting stored data and mis-attributing completion status to the wrong task.\nA:H - The self-linked list entry produces an unbounded loop in a workqueue context that repeatedly waits on and puts an already-freed command, hanging the TMR worker and oopsing on the use-after-free; the resulting I/O errors and session drops take the storage target offline."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/target/target_core_device.c","drivers/target/target_core_tmr.c","include/target/target_core_base.h"],"versions":[{"version":"51ec502a32665fed66c7f03799ede4023b212536","lessThan":"e1f59cd18a10969d08a082264b557876ca38766e","status":"affected","versionType":"git"},{"version":"51ec502a32665fed66c7f03799ede4023b212536","lessThan":"9158c86fd3237acaea8f0181c7836d90fd6eea10","status":"affected","versionType":"git"},{"version":"51ec502a32665fed66c7f03799ede4023b212536","lessThan":"eacfe32c3650bfd0e54224d160c431013d7f6998","status":"affected","versionType":"git"},{"version":"51ec502a32665fed66c7f03799ede4023b212536","lessThan":"ed18526289b5603bf2253dee50f1d7ec245cf397","status":"affected","versionType":"git"},{"version":"51ec502a32665fed66c7f03799ede4023b212536","lessThan":"2c43de56f9220dca3e28c774d1c5e2cab574223a","status":"affected","versionType":"git"},{"version":"51ec502a32665fed66c7f03799ede4023b212536","lessThan":"673db054d7a2b5a470d7a25baf65956d005ad729","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/target/target_core_device.c","drivers/target/target_core_tmr.c","include/target/target_core_base.h"],"versions":[{"version":"4.11","status":"affected"},{"version":"0","lessThan":"4.11","status":"unaffected","versionType":"semver"},{"version":"5.10.180","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.111","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.28","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.2.15","lessThanOrEqual":"6.2.*","status":"unaffected","versionType":"semver"},{"version":"6.3.2","lessThanOrEqual":"6.3.*","status":"unaffected","versionType":"semver"},{"version":"6.4","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"5.10.180"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"5.15.111"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.1.28"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.2.15"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.3.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.11","versionEndExcluding":"6.4"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/e1f59cd18a10969d08a082264b557876ca38766e"},{"url":"https://git.kernel.org/stable/c/9158c86fd3237acaea8f0181c7836d90fd6eea10"},{"url":"https://git.kernel.org/stable/c/eacfe32c3650bfd0e54224d160c431013d7f6998"},{"url":"https://git.kernel.org/stable/c/ed18526289b5603bf2253dee50f1d7ec245cf397"},{"url":"https://git.kernel.org/stable/c/2c43de56f9220dca3e28c774d1c5e2cab574223a"},{"url":"https://git.kernel.org/stable/c/673db054d7a2b5a470d7a25baf65956d005ad729"}],"title":"scsi: target: Fix multiple LUN_RESET handling","x_generator":{"engine":"bippy-1.2.0"}}}}