CVE-2025-68167 (GCVE-0-2025-68167)
Vulnerability from cvelistv5
Published
2025-12-16 13:42
Modified
2026-08-05 12:09
Summary
In the Linux kernel, the following vulnerability has been resolved: gpiolib: fix invalid pointer access in debugfs If the memory allocation in gpiolib_seq_start() fails, the s->private field remains uninitialized and is later dereferenced without checking in gpiolib_seq_stop(). Initialize s->private to NULL before calling kzalloc() and check it before dereferencing it.
Impacted products
Vendor Product Version
Linux Linux Version: e348544f7994d252427ed3ae637c7081cbb90f66
Version: e348544f7994d252427ed3ae637c7081cbb90f66
Version: e348544f7994d252427ed3ae637c7081cbb90f66
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpio/gpiolib.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "70180a6031056096c93ed2f47c41803268bdd91c",
              "status": "affected",
              "version": "e348544f7994d252427ed3ae637c7081cbb90f66",
              "versionType": "git"
            },
            {
              "lessThan": "3c91c8f424d3e44c8645ab765a38773e58afb07d",
              "status": "affected",
              "version": "e348544f7994d252427ed3ae637c7081cbb90f66",
              "versionType": "git"
            },
            {
              "lessThan": "2f6115ad8864cf3f48598f26c74c7c8e5c391919",
              "status": "affected",
              "version": "e348544f7994d252427ed3ae637c7081cbb90f66",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpio/gpiolib.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.9"
            },
            {
              "lessThan": "6.9",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.58",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.17.*",
              "status": "unaffected",
              "version": "6.17.8",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.58",
                  "versionStartIncluding": "6.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.17.8",
                  "versionStartIncluding": "6.9",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18",
                  "versionStartIncluding": "6.9",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ngpiolib: fix invalid pointer access in debugfs\n\nIf the memory allocation in gpiolib_seq_start() fails, the s-\u003eprivate\nfield remains uninitialized and is later dereferenced without checking\nin gpiolib_seq_stop(). Initialize s-\u003eprivate to NULL before calling\nkzalloc() and check it before dereferencing it."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerability is reached only by reading the local debugfs file /sys/kernel/debug/gpio; there is no network or remote path into gpiolib\u0027s seq_file handlers.\nAC:L - The attacker fully controls both required conditions \u2014 memory pressure to make the small GFP_KERNEL kzalloc fail, and unbounded repetition of read()/lseek() on the file, each of which drives multiple start/stop cycles \u2014 so the failure can simply be retried until it lands.\nPR:L - The gpio debugfs file is explicitly created world-readable (mode 0444) and needs no capability, so any unprivileged local user reaches it on the many embedded, automotive, industrial and Android deployments that mount debugfs traversable (mode=755 or uid/gid options), which is common precisely because GPIO debugging is the reason debugfs is mounted there.\nUI:N - The attacker triggers the bug entirely through their own read() calls on the debugfs file; no action by any other user or victim process is needed.\nS:U - The corruption stays within the kernel\u0027s own security authority \u2014 freed slab memory and per-CPU SRCU counters \u2014 with no crossing of a VM, IOMMU or sandbox boundary.\nC:H - gpiolib_seq_stop() reads priv-\u003eidx out of an already-freed kmalloc-16 object, and the accompanying double free corrupts the slab freelist, enabling overlapping allocations that yield arbitrary kernel memory disclosure.\nI:H - The stale idx is fed unvalidated into __srcu_read_unlock(), producing this_cpu_inc() at an attacker-influenced out-of-bounds offset from the per-CPU srcu_data, and the subsequent kfree() of an object owned by another allocation is a classic double-free write primitive.\nA:H - On the first iteration s-\u003eprivate is NULL, so gpiolib_seq_stop() dereferences NULL and oopses; on later iterations the use-after-free, wild per-CPU increment and double free reliably panic the kernel."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:09:56.647Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/70180a6031056096c93ed2f47c41803268bdd91c"
        },
        {
          "url": "https://git.kernel.org/stable/c/3c91c8f424d3e44c8645ab765a38773e58afb07d"
        },
        {
          "url": "https://git.kernel.org/stable/c/2f6115ad8864cf3f48598f26c74c7c8e5c391919"
        }
      ],
      "title": "gpiolib: fix invalid pointer access in debugfs",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-68167",
    "datePublished": "2025-12-16T13:42:47.480Z",
    "dateReserved": "2025-12-16T13:41:40.250Z",
    "dateUpdated": "2026-08-05T12:09:56.647Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…