{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-143246",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.362Z",
        "datePublished": "2026-12-03T09:20:56.976Z",
        "dateUpdated": "2026-12-03T09:20:56.976Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-03T09:20:56.976Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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->ndescs 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->desc[0] has already been acquired via gpiod_get_index(), but\ndescs->ndescs is still 0. Consequently, gpiod_put_array() frees descs\nwithout releasing descs->desc[0], leaking the descriptor.\n\nFix this by using a dedicated loop induction variable and incrementing\ndescs->ndescs 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."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/gpio/gpiolib.c"
                    ],
                    "versions": [
                        {
                            "version": "bf9346f5d47b4506aafbc384dfb5796b0adc3f8d",
                            "lessThan": "5e22a760a23ee3298b525b1bc6b0647272d6bf4b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bf9346f5d47b4506aafbc384dfb5796b0adc3f8d",
                            "lessThan": "233b889db63c316ec558db34ae15dcb4784dc39f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "bf9346f5d47b4506aafbc384dfb5796b0adc3f8d",
                            "lessThan": "b2a161687acdc297aa91fec7fa0966b5aecf0d16",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/gpio/gpiolib.c"
                    ],
                    "versions": [
                        {
                            "version": "4.20",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "4.20",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.66",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.7",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc3",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.20",
                                    "versionEndExcluding": "6.18.66"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.20",
                                    "versionEndExcluding": "7.3.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "4.20",
                                    "versionEndExcluding": "7.4-rc3"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/5e22a760a23ee3298b525b1bc6b0647272d6bf4b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/233b889db63c316ec558db34ae15dcb4784dc39f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b2a161687acdc297aa91fec7fa0966b5aecf0d16"
                }
            ],
            "title": "gpiolib: fix GPIO descriptor leak in gpiod_get_array()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}