# CVE-2026-139157: nvmet: use the enabled transport when disabling a port

- 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 12% of CVEs (2026-12-01)
- Published: 2026-11-30T13:32:06.626Z
- Modified: 2026-11-30T14:18:34.437Z
- Assigned by: Linux

## Description

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

nvmet: use the enabled transport when disabling a port

nvmet_disable_port() looks up the transport from the current
disc_addr.trtype, while nvmet_enable_port() records the transport in
port->tr_ops.  If trtype is changed while a port is being enabled, the
port can be removed through a different transport, passing the private
data of the original transport to the wrong ->remove_port().

The same mismatch is reachable with loop and RDMA: loop add_port()
leaves port->priv NULL, and RDMA remove_port() dereferences it.

Use port->tr_ops for removal and serialize trtype changes with
nvmet_config_sem in nvmet_addr_trtype_store(), so the transport that
added the port is also the one that removes it.

(As written by CVE List.)

## Affected

- Linux Linux: from 8f000cac6e7a6edca7ab93bafc7ed28b27c1545b before 7ed6f416744f98e25c43c5a81daa5581637001b7; from 8f000cac6e7a6edca7ab93bafc7ed28b27c1545b before 7d1118f62d0c7bfb46300257a2fae9a61a8e090c; from 8f000cac6e7a6edca7ab93bafc7ed28b27c1545b before ce42d3a48d5c280449476ea005e04854af3fa718; from 8f000cac6e7a6edca7ab93bafc7ed28b27c1545b before 929e8db88a87e4cd119809acee455816605e3e3e; from 8f000cac6e7a6edca7ab93bafc7ed28b27c1545b before 0becb7856d419c9fafcae3ad0182b2398f924f29; from 8f000cac6e7a6edca7ab93bafc7ed28b27c1545b before 8c17a634a1485d2450cb998d18d9a54bf1021565; from 8f000cac6e7a6edca7ab93bafc7ed28b27c1545b before 0c9d85e54196fd69810017a2624614fb6619cb8d; from 8f000cac6e7a6edca7ab93bafc7ed28b27c1545b before 60385038754ed9fb05dab127b35f88c702252505; 4.8 (not affected: before 4.8; from 5.10.275 up to 5.10.*; 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/7ed6f416744f98e25c43c5a81daa5581637001b7>
- <https://git.kernel.org/stable/c/7d1118f62d0c7bfb46300257a2fae9a61a8e090c>
- <https://git.kernel.org/stable/c/ce42d3a48d5c280449476ea005e04854af3fa718>
- <https://git.kernel.org/stable/c/929e8db88a87e4cd119809acee455816605e3e3e>
- <https://git.kernel.org/stable/c/0becb7856d419c9fafcae3ad0182b2398f924f29>
- <https://git.kernel.org/stable/c/8c17a634a1485d2450cb998d18d9a54bf1021565>
- <https://git.kernel.org/stable/c/0c9d85e54196fd69810017a2624614fb6619cb8d>
- <https://git.kernel.org/stable/c/60385038754ed9fb05dab127b35f88c702252505>

## Sources

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

---

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