CVE-2026-43054: scsi: target: tcm_loop: Drain commands in target_reset handler

Published May 1, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

scsi: target: tcmloop: Drain commands in targetreset handler

tcmlooptargetreset() violates the SCSI EH contract: it returns SUCCESS without draining any in-flight commands. The SCSI EH documentation (scsieh.rst) requires that when a reset handler returns SUCCESS the driver has made lower layers "forget about timed out scmds" and is ready for new commands. Every other SCSI LLD (virtioscsi, mpt3sas, ipr, scsidebug, mpi3mr) enforces this by draining or completing outstanding commands before returning SUCCESS.

Because tcmlooptargetreset() doesn't drain, the SCSI EH reuses in-flight scsicmnd structures for recovery commands (e.g. TUR) while the target core still has async completion work queued for the old secmd. The memset in queuecommand zeroes selun and lunrefactive, causing transportlunremovecmd() to skip its percpurefput(). The leaked LUN reference prevents transportclearlunref() from completing, hanging configfs LUN unlink forever in D-state:

INFO: task rm:264 blocked for more than 122 seconds. rm D 0 264 258 0x00004000 Call Trace: schedule+0x3d0/0x8e0 schedule+0x36/0xf0 transportclearlunref+0x78/0x90 [targetcoremod] coretpgremovelun+0x28/0xb0 [targetcoremod] targetfabricportunlink+0x50/0x60 [targetcoremod] configfsunlink+0x156/0x1f0 [configfs] vfsunlink+0x109/0x290 dounlinkat+0x1d5/0x2d0

Fix this by making tcmlooptargetreset() actually drain commands:

1. Issue TMRLUNRESET via tcmloopissuetmr() to drain all commands that the target core knows about (those not yet CMDTCOMPLETE).

2. Use blkmqtagsetbusyiter() to iterate all started requests and flushwork() on each secmd — this drains any deferred completion work for commands that already had CMDTCOMPLETE set before the TMR (which the TMR skips via targetcheckiostate()). This is the same pattern used by mpi3mr, scsidebug, and libsas to drain outstanding commands during reset.

Affected Software

13 affected componentsFixes available
Linux Linux kernel (tcm_loop)
Linux Linux kernel>=5.13<5.15.203
Linux Linux kernel>=5.16<6.1.168
Linux Linux kernel>=6.2<6.6.134
Linux Linux kernel>=6.7<6.12.81
Linux Linux kernel>=6.13<6.18.22
Linux Linux kernel>=6.19<6.19.12
Linux Linux kernel=7.0-rc1
Linux Linux kernel=7.0-rc2
Linux Linux kernel=7.0-rc3
Linux Linux kernel=7.0-rc4
Linux Linux kernel=7.0-rc5
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.12-17.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.113-1Fixed in 7.2.12-1Fixed in 7.2.13-1
  2. Compensating control

    Modify tcm_loop_target_reset() to drain commands before returning SUCCESS: issue TMR_LUN_RESET via tcm_loop_issue_tmr() to drain commands known to the target core, then use blk_mq_tagset_busy_iter() and flush_work() on each se_cmd to drain deferred completion work.

Event History

May 1, 2026
CVE Published
via MITRE·02:15 PM
Data Sourced
via MITRE·02:15 PM
Description
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2026-43054?

CVE-2026-43054 has been classified as a moderate severity vulnerability affecting the Linux kernel.

2

How do I fix CVE-2026-43054?

To mitigate CVE-2026-43054, update your Linux kernel to the latest stable version where the vulnerability has been patched.

3

What type of vulnerability is CVE-2026-43054?

CVE-2026-43054 is a SCSI command handling vulnerability within the Linux kernel's tcm_loop target.

4

Who is affected by CVE-2026-43054?

CVE-2026-43054 affects users running the Linux kernel with the tcm_loop module enabled.

5

What happens if CVE-2026-43054 is exploited?

Exploitation of CVE-2026-43054 could lead to system instability due to in-flight command handling issues.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203