nvmet-fc: don't drop the last assoc reference in nvmet_fc_delete_ctrl()
Summary
| CVE | CVE-2026-142939 |
| State | PUBLISHED |
| Assigner | Linux |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-12-03 04:18:35 UTC |
| Updated | 2026-12-03 04:18:35 UTC |
| Description | In the Linux kernel, the following vulnerability has been resolved:
nvmet-fc: don't drop the last assoc reference in nvmet_fc_delete_ctrl()
syzbot hit a recursive locking report on subsys->lock when a subsystem
is unlinked from an FC port.
nvmet_port_del_ctrls() holds subsys->lock while it calls ->delete_ctrl()
for each controller. nvmet_fc_delete_ctrl() grabs a reference on the
association, queues del_work and then drops the reference. If del_work
gets to run to completion before that put, ours is the last reference.
Freeing the assoc tears down the queues, the last nvmet_cq_put() drops
the last ctrl reference, and nvmet_ctrl_free() goes for subsys->lock
again:
WARNING: possible recursive locking detected
...
nvmet_ctrl_free+0xa6/0x8e0 drivers/nvme/target/core.c:1766
nvmet_cq_put+0x158/0x200 drivers/nvme/target/core.c:848
nvmet_fc_target_assoc_free+0x418/0x2220 drivers/nvme/target/fc.c:1173
nvmet_fc_delete_ctrl+0x717/0x7e0 drivers/nvme/target/fc.c:1581
nvmet_port_del_ctrls+0xfb/0x150 drivers/nvme/target/core.c:311
nvmet_port_subsys_drop_link+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. del_work does
list_del_rcu() and synchronize_rcu() before it drops the initial
reference, so an assoc we find on assoc_list can't go away before
rcu_read_unlock(). nvmet_fc_schedule_delete_assoc() 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. |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|
| CNA |
Linux |
Linux |
affected 8fd604d4b0d7e6cef59b7fa8f43d07314e522097 e813b4a80292ea70aebdcb0b1b4f30b68bc0b266 git |
Not specified |
| CNA |
Linux |
Linux |
affected b8338116689a5b541738a8bb89457e0c6c4d497e 1d8ff6495673462f58b4b0352620fc6db89bd10f git |
Not specified |
| CNA |
Linux |
Linux |
affected ccd49adde0547bd6b6c857909d1c4a3ad6ab93c0 0b373291c7b56a2807c9260da163649728ccfb65 git |
Not specified |
| CNA |
Linux |
Linux |
affected 4049dc96b8de7aeb3addcea039446e464726a525 b5bfeef31d29972178726ad04721f75731a3284f git |
Not specified |
| CNA |
Linux |
Linux |
affected 4049dc96b8de7aeb3addcea039446e464726a525 01b4359d57b76c23c0762f8231e1676ed9f87f7b git |
Not specified |
| CNA |
Linux |
Linux |
affected 4049dc96b8de7aeb3addcea039446e464726a525 c2cc01c130494e39e61775817d8053b31e471cb7 git |
Not specified |
| CNA |
Linux |
Linux |
affected 4049dc96b8de7aeb3addcea039446e464726a525 165301b5e2fd765fa05ea1044bbca8ba79820197 git |
Not specified |
| CNA |
Linux |
Linux |
affected 71803b10926e32738ede382b6ef4da345d35a2ab git |
Not specified |
| CNA |
Linux |
Linux |
affected 5.15.150 5.15.226 semver |
Not specified |
| CNA |
Linux |
Linux |
affected 6.1.80 6.1.193 semver |
Not specified |
| CNA |
Linux |
Linux |
affected 6.6.19 6.6.163 semver |
Not specified |
| CNA |
Linux |
Linux |
affected 6.7.7 6.8 semver |
Not specified |
| CNA |
Linux |
Linux |
affected 6.8 |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.8 semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 5.15.226 5.15.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.1.193 6.1.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.6.163 6.6.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.12.119 6.12.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 6.18.65 6.18.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 7.3.6 7.3.* semver |
Not specified |
| CNA |
Linux |
Linux |
unaffected 7.4-rc1 * original_commit_for_fix |
Not specified |
References
| Reference | Source | Link | Tags |
|---|
| git.kernel.org/stable/c/01b4359d57b76c23c0762f8231e1676ed9f87f7b |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/e813b4a80292ea70aebdcb0b1b4f30b68bc0b266 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/1d8ff6495673462f58b4b0352620fc6db89bd10f |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/165301b5e2fd765fa05ea1044bbca8ba79820197 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/c2cc01c130494e39e61775817d8053b31e471cb7 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/0b373291c7b56a2807c9260da163649728ccfb65 |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| git.kernel.org/stable/c/b5bfeef31d29972178726ad04721f75731a3284f |
416baaa9-dc9f-4396-8d5f-8c081fb06d67 |
git.kernel.org |
|
| CVE Program record |
CVE.ORG |
www.cve.org |
canonical |
| NVD vulnerability detail |
NVD |
nvd.nist.gov |
canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.