{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "c30c9b15187e977ab5928f7276e9dfcd8d6f9460"
            },
            {
              "fixed": "da32f7a50135cf804947ab89f73edc846e60bb58"
            },
            {
              "fixed": "00a15f18d3e9780e6fa3747982edc66ba99db5d9"
            },
            {
              "fixed": "c388ba89918ee0d33e4d30972051bd3ab30ae9c5"
            },
            {
              "fixed": "ac2505e34311d46b4ff03eed67547499ee4450ca"
            },
            {
              "fixed": "a07b44d9a463f04928aa65b1d03dd42417c62ae6"
            },
            {
              "fixed": "dfc57752ec53c3cc6105656d3037fb2f5e80e9cc"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.6.28"
            },
            {
              "fixed": "5.10.276"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.11.0"
            },
            {
              "fixed": "5.15.227"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.12.120"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.66"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142976.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nw1: remove the master's files before taking its locks\n\n__w1_remove_master_device() calls w1_destroy_master_attributes() with\nboth the mutex of the master and list_mutex held.  Removing the files\nwaits for the callbacks which are running, and nearly all of them take\none of these two locks:\n\n  __w1_remove_master_device()           read() of .../w1_master_slaves\n    mutex_lock(\u0026dev-\u003emutex)               kernfs active reference\n    mutex_lock(\u0026dev-\u003elist_mutex)          w1_master_attribute_show_slaves()\n    w1_destroy_master_attributes()          mutex_lock(\u0026md-\u003elist_mutex)\n      sysfs_remove_group()                    waits\n        waits for the reference\n\nThe files are readable for everybody, and a bus master goes away when, for\ninstance, a DS2490 USB adapter is unplugged.\n\nRemove the files first, before the locks are taken.  That has to be done\nbefore the slaves are detached and not afterwards: as long as the files\nexist, a write to w1_master_add could attach a new slave behind the back\nof this function, which would then wait for the reference count of the\nmaster for ever.  And it is done before the thread is stopped, because a\nwrite to w1_master_search wakes the thread up.",
  "id": "CVE-2026-142976",
  "modified": "2026-12-03T10:45:36.919821478Z",
  "published": "2026-12-03T09:17:06.769Z",
  "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/00a15f18d3e9780e6fa3747982edc66ba99db5d9"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a07b44d9a463f04928aa65b1d03dd42417c62ae6"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ac2505e34311d46b4ff03eed67547499ee4450ca"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c388ba89918ee0d33e4d30972051bd3ab30ae9c5"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/da32f7a50135cf804947ab89f73edc846e60bb58"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/dfc57752ec53c3cc6105656d3037fb2f5e80e9cc"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142976.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-142976"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "w1: remove the master's files before taking its locks"
}