{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "b662a078576e7d6e235b4e1b94863f0474cd8555"
            },
            {
              "fixed": "912aced00520607b058451ad05d2b42cd4041f7f"
            },
            {
              "fixed": "51f1e80959f2764d667308a8a1e94279ec8de3d6"
            },
            {
              "fixed": "b0675c06088677af4e3205da52de562b15f39a1c"
            },
            {
              "fixed": "e7334e114cf24c29d6299ed2b85357c4c70a9116"
            },
            {
              "fixed": "520b63e700b75c9d0ed2e9569324128107c1bc03"
            },
            {
              "fixed": "50d500af2b01e23405e91d862ed667c373921b34"
            },
            {
              "fixed": "cead6beb89256ae7145b65fbe8e8a5fedba4a47c"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.0.0"
            },
            {
              "fixed": "5.15.226"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.1.193"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.6.163"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.119"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.65"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139158.json"
  },
  "details": "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(\u0026port-\u003esubsystems), 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.",
  "id": "CVE-2026-139158",
  "modified": "2026-11-30T14:45:36.167998606Z",
  "published": "2026-11-30T13:32:07.188Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/50d500af2b01e23405e91d862ed667c373921b34"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/51f1e80959f2764d667308a8a1e94279ec8de3d6"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/520b63e700b75c9d0ed2e9569324128107c1bc03"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/912aced00520607b058451ad05d2b42cd4041f7f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b0675c06088677af4e3205da52de562b15f39a1c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/cead6beb89256ae7145b65fbe8e8a5fedba4a47c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e7334e114cf24c29d6299ed2b85357c4c70a9116"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139158.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139158"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "nvmet: protect nvmet_ports_list with nvmet_config_sem"
}