{"id":"CVE-2026-99960","aliases":["CVE-2026-99960"],"related":[],"kind":"vulnerability","state":"published","title":"nvmet: take subsys->lock while force-reconnecting in nvmet_subsys_attr_qid_max_store()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: take subsys->lock while force-reconnecting in nvmet_subsys_attr_qid_max_store()\n\nnvmet_subsys_attr_qid_max_store() sets subsys->max_qid and then walks\nsubsys->ctrls to force every controller to reconnect, but it holds only\nnvmet_config_sem (for write).  subsys->ctrls is protected by subsys->lock:\nnvmet_alloc_ctrl() adds an entry under subsys->lock, and nvmet_ctrl_free()\nremoves it under subsys->lock with list_del() + kfree() (not kfree_rcu).\nThe free path takes no nvmet_config_sem, so the two locks are independent.\n\nA controller teardown (host disconnect, keep-alive timeout or fatal error\n-> nvmet_sq_destroy() -> nvmet_ctrl_put() -> nvmet_ctrl_free()) can\ntherefore list_del() an entry while qid_max_store() is iterating the list,\ncorrupting the walk.\n\nKASAN, concurrent \"echo 128 > .../subsystems/<nqn>/attr_qid_max\" racing\nnvme-loop controllers connecting and disconnecting, panics in seconds:\n\n  BUG: KASAN: null-ptr-deref in nvmet_subsys_attr_qid_max_store+0x10d/0x1b0\n  Read of size 8 at addr 0000000000000090\n  Call Trace:\n   nvmet_subsys_attr_qid_max_store+0x10d/0x1b0\n   configfs_write_iter+0x1a7/0x250\n   vfs_write+0x5df/0x940\n   ksys_write+0xfd/0x1e0\n\n(also seen as a general-protection fault dereferencing a LIST_POISON\npointer at the same instruction.)\n\nTake subsys->lock around the list_for_each_entry() loop, matching every\nother subsys->ctrls accessor.  ->delete_ctrl() only queues asynchronous\ncontroller teardown, so it does not re-enter subsys->lock under the loop.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: take subsys->lock while force-reconnecting in nvmet_subsys_attr_qid_max_store()\n\nnvmet_subsys_attr_qid_max_store() sets subsys->max_qid and then walks\nsubsys->ctrls to force every controller to reconnect, but it holds only\nnvmet_config_sem (for write).  subsys->ctrls is protected by subsys->lock:\nnvmet_alloc_ctrl() adds an entry under subsys->lock, and nvmet_ctrl_free()\nremoves it under subsys->lock with list_del() + kfree() (not kfree_rcu).\nThe free path takes no nvmet_config_sem, so the two locks are independent.\n\nA controller teardown (host disconnect, keep-alive timeout or fatal error\n-> nvmet_sq_destroy() -> nvmet_ctrl_put() -> nvmet_ctrl_free()) can\ntherefore list_del() an entry while qid_max_store() is iterating the list,\ncorrupting the walk.\n\nKASAN, concurrent \"echo 128 > .../subsystems/<nqn>/attr_qid_max\" racing\nnvme-loop controllers connecting and disconnecting, panics in seconds:\n\n  BUG: KASAN: null-ptr-deref in nvmet_subsys_attr_qid_max_store+0x10d/0x1b0\n  Read of size 8 at addr 0000000000000090\n  Call Trace:\n   nvmet_subsys_attr_qid_max_store+0x10d/0x1b0\n   configfs_write_iter+0x1a7/0x250\n   vfs_write+0x5df/0x940\n   ksys_write+0xfd/0x1e0\n\n(also seen as a general-protection fault dereferencing a LIST_POISON\npointer at the same instruction.)\n\nTake subsys->lock around the list_for_each_entry() loop, matching every\nother subsys->ctrls accessor.  ->delete_ctrl() only queues asynchronous\ncontroller teardown, so it does not re-enter subsys->lock under the loop.","source":"cvelist"}],"published":"2026-11-30T13:18:39.673Z","modified":"2026-11-30T14:20:33.590Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"3e980f5995e0bb4d86fef873a9c9ad66721580d0","fixed":"54f824ec04acab4d54291998ee709d1766ff9e88","status":"affected"},{"type":"git","introduced":"3e980f5995e0bb4d86fef873a9c9ad66721580d0","fixed":"224b6699bd131de274acfb4a294bf99d1def653e","status":"affected"},{"type":"git","introduced":"3e980f5995e0bb4d86fef873a9c9ad66721580d0","fixed":"123b86359529bc983d81fdd31a1de6f6d3f1bd63","status":"affected"},{"type":"git","introduced":"3e980f5995e0bb4d86fef873a9c9ad66721580d0","fixed":"62518ed062b5a93e091b43cdfa05b9d9796ac184","status":"affected"},{"type":"git","introduced":"3e980f5995e0bb4d86fef873a9c9ad66721580d0","fixed":"7aa18e5dbc2929d5792a037af73eeb99545c2156","status":"affected"},{"type":"git","introduced":"3e980f5995e0bb4d86fef873a9c9ad66721580d0","fixed":"9f426f14051181e251590783e68ce589a63e2b1c","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.1","status":"unaffected"},{"type":"semver","introduced":"6.1.193","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.163","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.117","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.63","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.4","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc1","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/54f824ec04acab4d54291998ee709d1766ff9e88","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/224b6699bd131de274acfb4a294bf99d1def653e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/123b86359529bc983d81fdd31a1de6f6d3f1bd63","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/62518ed062b5a93e091b43cdfa05b9d9796ac184","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/7aa18e5dbc2929d5792a037af73eeb99545c2156","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9f426f14051181e251590783e68ce589a63e2b1c","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99960","url":"https://www.cve.org/CVERecord?id=CVE-2026-99960","licence":"CVE Terms of Use","modified":"2026-11-30T13:18:39.673Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99960","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99960","licence":"Public domain","modified":"2026-11-30T14:20:33.590Z"}],"updatedAt":"2026-11-30T14:33:42.593Z","epss":{"score":0.00318,"percentile":0.26748,"date":"2026-12-01T12:00:22.000Z"}}