{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "a060b8c511abb0997381b397e52149a5e3e5259a"
            },
            {
              "fixed": "00ffca4b5fdd99f72b5811dc5f954f3f49aaae31"
            },
            {
              "fixed": "53043b9e83cc7f4e30e70161b67ae93c4c9fdb87"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "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/143xxx/CVE-2026-143057.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ngpio: shared: fix a race in shared desc release path\n\ngpiod_shared_put() races with concurrent calls to\ndevm_gpiod_shared_get() like so:\n\nCPU 0 (unbind / probe failure)      CPU 1 (concurrent proxy probe)\n==============================      ==============================\ngpiod_shared_put()\n  kref_put(\u0026entry-\u003eref, ...)\n    refcount_dec_and_test() // -\u003e 0\n                                    devm_gpiod_shared_get()\n                                      mutex_lock(\u0026entry-\u003elock);\n                                      if (entry-\u003eshared_desc) {\n                                        kref_get(\u0026entry-\u003eref); // on 0!\n                                        shared_desc = entry-\u003eshared_desc;\n                                      }\n                                      mutex_unlock(\u0026entry-\u003elock);\n    gpio_shared_release()\n      mutex_lock(\u0026entry-\u003elock);\n      kfree(shared_desc);\n      entry-\u003eshared_desc = NULL;\n      mutex_unlock(\u0026entry-\u003elock);\n                                      // uses freed shared_desc\n\nBecause gpiod_shared_put() decrements entry-\u003eref without holding\nentry-\u003elock and gpio_shared_release() only acquires entry-\u003elock after the\nreference count has already reached zero, a concurrent call to\ndevm_gpiod_shared_get() can acquire entry-\u003elock in the intermediate window\nand observe a non-NULL entry-\u003eshared_desc. This can result in a\nuse-after-free and a double-free when the second consumer releases its\nreference.\n\nUse kref_put_mutex() to ensure the entry lock is taken without a window\nin which a concurrent user can see a non-NULL entry-\u003eshared_desc while\nit's being released.",
  "id": "CVE-2026-143057",
  "modified": "2026-12-03T10:45:24.859959390Z",
  "published": "2026-12-03T09:18:34.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/00ffca4b5fdd99f72b5811dc5f954f3f49aaae31"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/53043b9e83cc7f4e30e70161b67ae93c4c9fdb87"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143057.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-143057"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "gpio: shared: fix a race in shared desc release path"
}