{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "bf9346f5d47b4506aafbc384dfb5796b0adc3f8d"
            },
            {
              "fixed": "5e22a760a23ee3298b525b1bc6b0647272d6bf4b"
            },
            {
              "fixed": "233b889db63c316ec558db34ae15dcb4784dc39f"
            },
            {
              "fixed": "b2a161687acdc297aa91fec7fa0966b5aecf0d16"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "4.20.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/143xxx/CVE-2026-143246.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ngpiolib: fix GPIO descriptor leak in gpiod_get_array()\n\nIn gpiod_get_array(), descs-\u003endescs is used as the loop induction\nvariable and is only incremented at the end of each iteration. When\nkrealloc() fails on the first iteration (when index is 0),\ndescs-\u003edesc[0] has already been acquired via gpiod_get_index(), but\ndescs-\u003endescs is still 0. Consequently, gpiod_put_array() frees descs\nwithout releasing descs-\u003edesc[0], leaking the descriptor.\n\nFix this by using a dedicated loop induction variable and incrementing\ndescs-\u003endescs immediately upon storing the retrieved descriptor.\nAdditionally, since the fast-path array_info setup only executes for the\nfirst element (index 0), simplify the bitmap_set() calls to start at bit\n0 for count bits instead of calculating offsets from the loop index.",
  "id": "CVE-2026-143246",
  "modified": "2026-12-03T10:45:23.043134826Z",
  "published": "2026-12-03T09:20:56.976Z",
  "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/233b889db63c316ec558db34ae15dcb4784dc39f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/5e22a760a23ee3298b525b1bc6b0647272d6bf4b"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b2a161687acdc297aa91fec7fa0966b5aecf0d16"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143246.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-143246"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "gpiolib: fix GPIO descriptor leak in gpiod_get_array()"
}