# CVE-2026-99960: nvmet: take subsys->lock while force-reconnecting in nvmet_subsys_attr_qid_max_store()

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 26% of CVEs (2026-12-01)
- Published: 2026-11-30T13:18:39.673Z
- Modified: 2026-11-30T14:20:33.590Z
- Assigned by: Linux

## Description

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

nvmet: take subsys->lock while force-reconnecting in nvmet_subsys_attr_qid_max_store()

nvmet_subsys_attr_qid_max_store() sets subsys->max_qid and then walks
subsys->ctrls to force every controller to reconnect, but it holds only
nvmet_config_sem (for write).  subsys->ctrls is protected by subsys->lock:
nvmet_alloc_ctrl() adds an entry under subsys->lock, and nvmet_ctrl_free()
removes it under subsys->lock with list_del() + kfree() (not kfree_rcu).
The free path takes no nvmet_config_sem, so the two locks are independent.

A controller teardown (host disconnect, keep-alive timeout or fatal error
-> nvmet_sq_destroy() -> nvmet_ctrl_put() -> nvmet_ctrl_free()) can
therefore list_del() an entry while qid_max_store() is iterating the list,
corrupting the walk.

KASAN, concurrent "echo 128 > .../subsystems/<nqn>/attr_qid_max" racing
nvme-loop controllers connecting and disconnecting, panics in seconds:

  BUG: KASAN: null-ptr-deref in nvmet_subsys_attr_qid_max_store+0x10d/0x1b0
  Read of size 8 at addr 0000000000000090
  Call Trace:
   nvmet_subsys_attr_qid_max_store+0x10d/0x1b0
   configfs_write_iter+0x1a7/0x250
   vfs_write+0x5df/0x940
   ksys_write+0xfd/0x1e0

(also seen as a general-protection fault dereferencing a LIST_POISON
pointer at the same instruction.)

Take subsys->lock around the list_for_each_entry() loop, matching every
other subsys->ctrls accessor.  ->delete_ctrl() only queues asynchronous
controller teardown, so it does not re-enter subsys->lock under the loop.

(As written by CVE List.)

## Affected

- Linux Linux: from 3e980f5995e0bb4d86fef873a9c9ad66721580d0 before 54f824ec04acab4d54291998ee709d1766ff9e88; from 3e980f5995e0bb4d86fef873a9c9ad66721580d0 before 224b6699bd131de274acfb4a294bf99d1def653e; from 3e980f5995e0bb4d86fef873a9c9ad66721580d0 before 123b86359529bc983d81fdd31a1de6f6d3f1bd63; from 3e980f5995e0bb4d86fef873a9c9ad66721580d0 before 62518ed062b5a93e091b43cdfa05b9d9796ac184; from 3e980f5995e0bb4d86fef873a9c9ad66721580d0 before 7aa18e5dbc2929d5792a037af73eeb99545c2156; from 3e980f5995e0bb4d86fef873a9c9ad66721580d0 before 9f426f14051181e251590783e68ce589a63e2b1c; 6.1 (not affected: before 6.1; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.117 up to 6.12.*; from 6.18.63 up to 6.18.*; from 7.3.4 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/54f824ec04acab4d54291998ee709d1766ff9e88>
- <https://git.kernel.org/stable/c/224b6699bd131de274acfb4a294bf99d1def653e>
- <https://git.kernel.org/stable/c/123b86359529bc983d81fdd31a1de6f6d3f1bd63>
- <https://git.kernel.org/stable/c/62518ed062b5a93e091b43cdfa05b9d9796ac184>
- <https://git.kernel.org/stable/c/7aa18e5dbc2929d5792a037af73eeb99545c2156>
- <https://git.kernel.org/stable/c/9f426f14051181e251590783e68ce589a63e2b1c>

## Sources

- CVE List: [CVE-2026-99960](https://www.cve.org/CVERecord?id=CVE-2026-99960), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-99960](https://nvd.nist.gov/vuln/detail/CVE-2026-99960), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-99960 · Whole record: https://cve.day/CVE-2026-99960.json · Rebuilt by cve.day 2026-11-30T14:33:42.593Z
