CVE-2026-142939: nvmet-fc: don't drop the last assoc reference in nvmet_fc_delete_ctrl()

Published Dec 3, 2026
·
Updated

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

nvmet-fc: don't drop the last assoc reference in nvmetfcdeletectrl()

syzbot hit a recursive locking report on subsys->lock when a subsystem is unlinked from an FC port.

nvmetportdelctrls() holds subsys->lock while it calls ->deletectrl() for each controller. nvmetfcdeletectrl() grabs a reference on the association, queues delwork and then drops the reference. If delwork gets to run to completion before that put, ours is the last reference. Freeing the assoc tears down the queues, the last nvmetcqput() drops the last ctrl reference, and nvmetctrlfree() goes for subsys->lock again:

WARNING: possible recursive locking detected ... nvmetctrlfree+0xa6/0x8e0 drivers/nvme/target/core.c:1766 nvmetcqput+0x158/0x200 drivers/nvme/target/core.c:848 nvmetfctargetassocfree+0x418/0x2220 drivers/nvme/target/fc.c:1173 nvmetfcdeletectrl+0x717/0x7e0 drivers/nvme/target/fc.c:1581 nvmetportdelctrls+0xfb/0x150 drivers/nvme/target/core.c:311 nvmetportsubsysdroplink+0x1e8/0x310 drivers/nvme/target/configfs.c:1119

It's a real hang, not only a lockdep warning. I reproduced it with fcloop by putting an msleep() before the put: rm on the configfs link gets stuck in D state for good.

I don't think we need that reference at all. delwork does listdelrcu() and synchronizercu() before it drops the initial reference, so an assoc we find on assoclist can't go away before rcureadunlock(). nvmetfcscheduledeleteassoc() doesn't sleep, so just call it inside the RCU section and get rid of the get/put. If the assoc is already being deleted, terminating is set and the call is a no-op, which matches what happened before when the get failed.

With the same msleep() in place the patched kernel unlinks cleanly and the assoc is freed from the workqueue.

Affected Software

1 affected component
Linux Linux kernel

Event History

Dec 3, 2026
CVE Published
via MITRE·03:26 AM
Data Sourced
via MITRE·03:26 AM
Description
Data Sourced
via NVD·04:18 AM
Description

Frequently Asked Questions

1

Which systems are exposed to this issue?

Systems using the Linux NVMe target Fibre Channel transport (nvmet-fc) may be affected when a subsystem is unlinked from an FC port and its controllers are deleted. The provided information does not establish whether this configuration is enabled or used by default.

2

What event triggers the hang?

The issue occurs during controller deletion while the subsystem lock is held. If association cleanup completes before a reference is dropped, teardown can re-enter the subsystem lock recursively.

3

How can an administrator recognize the problem?

The affected operation can hang rather than only produce a lockdep warning. Kernel logs may report a possible recursive locking detection involving subsys->lock, with stack frames including nvmet_fc_delete_ctrl(), nvmet_fc_target_assoc_free(), and nvmet_ctrl_free().

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