CVE-2026-139158

nvmet: protect nvmet_ports_list with nvmet_config_sem

Published Nov 30, 2026 CVSS 3.1 · 4.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The kernel nvmet subsystem suffered from an improper locking implementation, where readers hold the nvmet_config_sem semaphore but writers do not acquire it, relying instead on an unstated configuration directory lock. This mismatch allows concurrent writers to access the nvmet_ports_list list while it is being modified, and a list_add operation may publish an uninitialized port before its subsystems list is initialized. The resulting data race could corrupt kernel memory, trigger a crash, or lead to a denial of service. The vulnerability is a classic race condition that, if triggered by a well‑timed sequence of user‑space calls to the nvmet interface, may cause unreliable system behavior.

Affected Systems

The affected product is the Linux kernel across all vendors that implement the nvmet subsystem (both Linux:Linux entries in the CNA list). No specific kernel version range is provided in the CNA data; therefore the vulnerability could exist in any version that implemented nvmet before the fix. If version data is needed, review the change history in the relevant commit logs.

Risk and Exploitability

The CVSS score is not supplied, and the EPSS score is unavailable, so the quantitative likelihood of exploitation is unknown. However, race conditions within kernel code are well known to be high‑impact once they can be triggered. The vulnerability is not listed in the CISA KEV catalog, so there is no evidence of public exploitation as of the data snapshot. The likely attack vector requires local privileges or an ability to invoke the nvmet subsystem, and the risk increases significantly in environments that expose nvmet to untrusted processes.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a kernel version that includes the nvmet_ports_list semaphore protection (see commit 50d500af2b01e23405e91d862ed667c373921b34 or later).
  • If your distribution has not yet released an updated kernel, download the kernel source, apply the relevant commits that protect the nvmet_ports_list and reorder list_add, then recompile and install the patched kernel.
  • Reboot the system into the updated kernel.

Generated by OpenCVE AI on December 1, 2026 at 10:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-413
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.1, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-362
Type Values Removed Values Added
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.
Title nvmet: protect nvmet_ports_list with nvmet_config_sem
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-362

    Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

  • CWE-413

    Improper Resource Locking

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:32 PM