# CVE-2026-139158: nvmet: protect nvmet_ports_list with nvmet_config_sem

- 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.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2026-11-30T13:32:07.188Z
- Modified: 2026-11-30T14:18:34.577Z
- Assigned by: Linux

## Description

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

nvmet: protect nvmet_ports_list with nvmet_config_sem

Readers of nvmet_ports_list (e.g. nvmet_subsys_disc_changed()) hold
nvmet_config_sem and assert it via lockdep.  The writers --
nvmet_ports_make() and nvmet_port_release() -- do not take the lock;
they rely on the parent directory's VFS inode lock for serialization,
which is an implementation detail of configfs and not a guaranteed
contract.  Align the writers with the lock the readers already require.

Also move list_add() in nvmet_ports_make() to after the port is fully
initialized: the old position published the port on the global list
before INIT_LIST_HEAD(&port->subsystems), so a concurrent reader
could traverse uninitialized list heads.

flush_workqueue() in nvmet_port_release() stays outside the semaphore
to avoid a lock dependency on nvmet_wq.

(As written by CVE List.)

## Affected

- Linux Linux: from b662a078576e7d6e235b4e1b94863f0474cd8555 before 912aced00520607b058451ad05d2b42cd4041f7f; from b662a078576e7d6e235b4e1b94863f0474cd8555 before 51f1e80959f2764d667308a8a1e94279ec8de3d6; from b662a078576e7d6e235b4e1b94863f0474cd8555 before b0675c06088677af4e3205da52de562b15f39a1c; from b662a078576e7d6e235b4e1b94863f0474cd8555 before e7334e114cf24c29d6299ed2b85357c4c70a9116; from b662a078576e7d6e235b4e1b94863f0474cd8555 before 520b63e700b75c9d0ed2e9569324128107c1bc03; from b662a078576e7d6e235b4e1b94863f0474cd8555 before 50d500af2b01e23405e91d862ed667c373921b34; from b662a078576e7d6e235b4e1b94863f0474cd8555 before cead6beb89256ae7145b65fbe8e8a5fedba4a47c; 5.0 (not affected: before 5.0; from 5.15.226 up to 5.15.*; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.119 up to 6.12.*; from 6.18.65 up to 6.18.*; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/912aced00520607b058451ad05d2b42cd4041f7f>
- <https://git.kernel.org/stable/c/51f1e80959f2764d667308a8a1e94279ec8de3d6>
- <https://git.kernel.org/stable/c/b0675c06088677af4e3205da52de562b15f39a1c>
- <https://git.kernel.org/stable/c/e7334e114cf24c29d6299ed2b85357c4c70a9116>
- <https://git.kernel.org/stable/c/520b63e700b75c9d0ed2e9569324128107c1bc03>
- <https://git.kernel.org/stable/c/50d500af2b01e23405e91d862ed667c373921b34>
- <https://git.kernel.org/stable/c/cead6beb89256ae7145b65fbe8e8a5fedba4a47c>

## Sources

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

---

Page: https://cve.day/CVE-2026-139158 · Whole record: https://cve.day/CVE-2026-139158.json · Rebuilt by cve.day 2026-11-30T14:32:59.726Z
