{"id":"CVE-2026-99960","summary":"nvmet: take subsys-\u003elock while force-reconnecting in nvmet_subsys_attr_qid_max_store()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: take subsys-\u003elock while force-reconnecting in nvmet_subsys_attr_qid_max_store()\n\nnvmet_subsys_attr_qid_max_store() sets subsys-\u003emax_qid and then walks\nsubsys-\u003ectrls to force every controller to reconnect, but it holds only\nnvmet_config_sem (for write).  subsys-\u003ectrls is protected by subsys-\u003elock:\nnvmet_alloc_ctrl() adds an entry under subsys-\u003elock, and nvmet_ctrl_free()\nremoves it under subsys-\u003elock 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-\u003e nvmet_sq_destroy() -\u003e nvmet_ctrl_put() -\u003e 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 \u003e .../subsystems/\u003cnqn\u003e/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-\u003elock around the list_for_each_entry() loop, matching every\nother subsys-\u003ectrls accessor.  -\u003edelete_ctrl() only queues asynchronous\ncontroller teardown, so it does not re-enter subsys-\u003elock under the loop.","modified":"2026-12-01T21:00:54.228385579Z","published":"2026-11-30T13:18:39.673Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99960.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/123b86359529bc983d81fdd31a1de6f6d3f1bd63"},{"type":"WEB","url":"https://git.kernel.org/stable/c/224b6699bd131de274acfb4a294bf99d1def653e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/54f824ec04acab4d54291998ee709d1766ff9e88"},{"type":"WEB","url":"https://git.kernel.org/stable/c/62518ed062b5a93e091b43cdfa05b9d9796ac184"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7aa18e5dbc2929d5792a037af73eeb99545c2156"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9f426f14051181e251590783e68ce589a63e2b1c"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99960.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99960"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"3e980f5995e0bb4d86fef873a9c9ad66721580d0"},{"fixed":"54f824ec04acab4d54291998ee709d1766ff9e88"},{"fixed":"224b6699bd131de274acfb4a294bf99d1def653e"},{"fixed":"123b86359529bc983d81fdd31a1de6f6d3f1bd63"},{"fixed":"62518ed062b5a93e091b43cdfa05b9d9796ac184"},{"fixed":"7aa18e5dbc2929d5792a037af73eeb99545c2156"},{"fixed":"9f426f14051181e251590783e68ce589a63e2b1c"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99960.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.193"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.117"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.63"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.4"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-99960.json"}}],"schema_version":"1.9.2"}