{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-143057",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.345Z",
        "datePublished": "2026-12-03T09:18:34.769Z",
        "dateUpdated": "2026-12-03T09:18:34.769Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-03T09:18:34.769Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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(&entry->ref, ...)\n    refcount_dec_and_test() // -> 0\n                                    devm_gpiod_shared_get()\n                                      mutex_lock(&entry->lock);\n                                      if (entry->shared_desc) {\n                                        kref_get(&entry->ref); // on 0!\n                                        shared_desc = entry->shared_desc;\n                                      }\n                                      mutex_unlock(&entry->lock);\n    gpio_shared_release()\n      mutex_lock(&entry->lock);\n      kfree(shared_desc);\n      entry->shared_desc = NULL;\n      mutex_unlock(&entry->lock);\n                                      // uses freed shared_desc\n\nBecause gpiod_shared_put() decrements entry->ref without holding\nentry->lock and gpio_shared_release() only acquires entry->lock after the\nreference count has already reached zero, a concurrent call to\ndevm_gpiod_shared_get() can acquire entry->lock in the intermediate window\nand observe a non-NULL entry->shared_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->shared_desc while\nit's being released."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/gpio/gpiolib-shared.c"
                    ],
                    "versions": [
                        {
                            "version": "a060b8c511abb0997381b397e52149a5e3e5259a",
                            "lessThan": "00ffca4b5fdd99f72b5811dc5f954f3f49aaae31",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "a060b8c511abb0997381b397e52149a5e3e5259a",
                            "lessThan": "53043b9e83cc7f4e30e70161b67ae93c4c9fdb87",
                            "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-shared.c"
                    ],
                    "versions": [
                        {
                            "version": "6.19",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.19",
                            "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": "6.19",
                                    "versionEndExcluding": "7.3.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.19",
                                    "versionEndExcluding": "7.4-rc3"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/00ffca4b5fdd99f72b5811dc5f954f3f49aaae31"
                },
                {
                    "url": "https://git.kernel.org/stable/c/53043b9e83cc7f4e30e70161b67ae93c4c9fdb87"
                }
            ],
            "title": "gpio: shared: fix a race in shared desc release path",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}