{"id":"CVE-2026-139158","aliases":["CVE-2026-139158"],"related":[],"kind":"vulnerability","state":"published","title":"nvmet: protect nvmet_ports_list with nvmet_config_sem","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: protect nvmet_ports_list with nvmet_config_sem\n\nReaders of nvmet_ports_list (e.g. nvmet_subsys_disc_changed()) hold\nnvmet_config_sem and assert it via lockdep.  The writers --\nnvmet_ports_make() and nvmet_port_release() -- do not take the lock;\nthey rely on the parent directory's VFS inode lock for serialization,\nwhich is an implementation detail of configfs and not a guaranteed\ncontract.  Align the writers with the lock the readers already require.\n\nAlso move list_add() in nvmet_ports_make() to after the port is fully\ninitialized: the old position published the port on the global list\nbefore INIT_LIST_HEAD(&port->subsystems), so a concurrent reader\ncould traverse uninitialized list heads.\n\nflush_workqueue() in nvmet_port_release() stays outside the semaphore\nto avoid a lock dependency on nvmet_wq.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvmet: protect nvmet_ports_list with nvmet_config_sem\n\nReaders of nvmet_ports_list (e.g. nvmet_subsys_disc_changed()) hold\nnvmet_config_sem and assert it via lockdep.  The writers --\nnvmet_ports_make() and nvmet_port_release() -- do not take the lock;\nthey rely on the parent directory's VFS inode lock for serialization,\nwhich is an implementation detail of configfs and not a guaranteed\ncontract.  Align the writers with the lock the readers already require.\n\nAlso move list_add() in nvmet_ports_make() to after the port is fully\ninitialized: the old position published the port on the global list\nbefore INIT_LIST_HEAD(&port->subsystems), so a concurrent reader\ncould traverse uninitialized list heads.\n\nflush_workqueue() in nvmet_port_release() stays outside the semaphore\nto avoid a lock dependency on nvmet_wq.","source":"cvelist"}],"published":"2026-11-30T13:32:07.188Z","modified":"2026-11-30T14:18:34.577Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"b662a078576e7d6e235b4e1b94863f0474cd8555","fixed":"912aced00520607b058451ad05d2b42cd4041f7f","status":"affected"},{"type":"git","introduced":"b662a078576e7d6e235b4e1b94863f0474cd8555","fixed":"51f1e80959f2764d667308a8a1e94279ec8de3d6","status":"affected"},{"type":"git","introduced":"b662a078576e7d6e235b4e1b94863f0474cd8555","fixed":"b0675c06088677af4e3205da52de562b15f39a1c","status":"affected"},{"type":"git","introduced":"b662a078576e7d6e235b4e1b94863f0474cd8555","fixed":"e7334e114cf24c29d6299ed2b85357c4c70a9116","status":"affected"},{"type":"git","introduced":"b662a078576e7d6e235b4e1b94863f0474cd8555","fixed":"520b63e700b75c9d0ed2e9569324128107c1bc03","status":"affected"},{"type":"git","introduced":"b662a078576e7d6e235b4e1b94863f0474cd8555","fixed":"50d500af2b01e23405e91d862ed667c373921b34","status":"affected"},{"type":"git","introduced":"b662a078576e7d6e235b4e1b94863f0474cd8555","fixed":"cead6beb89256ae7145b65fbe8e8a5fedba4a47c","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.0","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.0","status":"unaffected"},{"type":"semver","introduced":"5.15.226","lastAffected":"5.15.*","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.119","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.6","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/912aced00520607b058451ad05d2b42cd4041f7f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/51f1e80959f2764d667308a8a1e94279ec8de3d6","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b0675c06088677af4e3205da52de562b15f39a1c","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e7334e114cf24c29d6299ed2b85357c4c70a9116","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/520b63e700b75c9d0ed2e9569324128107c1bc03","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/50d500af2b01e23405e91d862ed667c373921b34","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cead6beb89256ae7145b65fbe8e8a5fedba4a47c","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-139158","url":"https://www.cve.org/CVERecord?id=CVE-2026-139158","licence":"CVE Terms of Use","modified":"2026-11-30T13:32:07.188Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-139158","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139158","licence":"Public domain","modified":"2026-11-30T14:18:34.577Z"}],"updatedAt":"2026-11-30T14:32:59.726Z","epss":{"score":0.00206,"percentile":0.11279,"date":"2026-12-01T12:00:22.000Z"}}