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

Published Nov 30, 2026
·
Updated

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

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

nvmetsubsysattrqidmaxstore() sets subsys->maxqid and then walks subsys->ctrls to force every controller to reconnect, but it holds only nvmetconfigsem (for write). subsys->ctrls is protected by subsys->lock: nvmetallocctrl() adds an entry under subsys->lock, and nvmetctrlfree() removes it under subsys->lock with listdel() + kfree() (not kfreercu). The free path takes no nvmetconfigsem, so the two locks are independent.

A controller teardown (host disconnect, keep-alive timeout or fatal error -> nvmetsqdestroy() -> nvmetctrlput() -> nvmetctrlfree()) can therefore listdel() an entry while qidmaxstore() is iterating the list, corrupting the walk.

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

BUG: KASAN: null-ptr-deref in nvmetsubsysattrqidmaxstore+0x10d/0x1b0 Read of size 8 at addr 0000000000000090 Call Trace: nvmetsubsysattrqidmaxstore+0x10d/0x1b0 configfswriteiter+0x1a7/0x250 vfswrite+0x5df/0x940 ksyswrite+0xfd/0x1e0

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

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

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In nvmet_subsys_attr_qid_max_store(), take subsys->lock around the subsys->ctrls list_for_each_entry() loop while force-reconnecting controllers.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:18 PM
Data Sourced
via MITRE·01:18 PM
Description

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