CVE-2025-68167 (GCVE-0-2025-68167)

Vulnerability from cvelistv5 – Published: 2025-12-16 13:42 – Updated: 2026-08-05 12:09
VLAI
Title
gpiolib: fix invalid pointer access in debugfs
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.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: e348544f7994d252427ed3ae637c7081cbb90f66 , < 70180a6031056096c93ed2f47c41803268bdd91c (git)
Affected: e348544f7994d252427ed3ae637c7081cbb90f66 , < 3c91c8f424d3e44c8645ab765a38773e58afb07d (git)
Affected: e348544f7994d252427ed3ae637c7081cbb90f66 , < 2f6115ad8864cf3f48598f26c74c7c8e5c391919 (git)
Create a notification for this product.
Linux Linux Affected: 6.9
Unaffected: 0 , < 6.9 (semver)
Unaffected: 6.12.58 , ≤ 6.12.* (semver)
Unaffected: 6.17.8 , ≤ 6.17.* (semver)
Unaffected: 6.18 , ≤ * (original_commit_for_fix)
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",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-68167",
      "date": "2026-08-10",
      "epss": "0.00135",
      "percentile": "0.03389"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-68167\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-12-16T14:15:48.540\",\"lastModified\":\"2026-07-30T06:24:31.570\",\"vulnStatus\":\"Deferred\",\"cveTags\":[],\"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.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/gpio/gpiolib.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"e348544f7994d252427ed3ae637c7081cbb90f66\",\"lessThan\":\"70180a6031056096c93ed2f47c41803268bdd91c\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"e348544f7994d252427ed3ae637c7081cbb90f66\",\"lessThan\":\"3c91c8f424d3e44c8645ab765a38773e58afb07d\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"e348544f7994d252427ed3ae637c7081cbb90f66\",\"lessThan\":\"2f6115ad8864cf3f48598f26c74c7c8e5c391919\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/gpio/gpiolib.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.9\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.9\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.58\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.17.8\",\"lessThanOrEqual\":\"6.17.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/2f6115ad8864cf3f48598f26c74c7c8e5c391919\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/3c91c8f424d3e44c8645ab765a38773e58afb07d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/70180a6031056096c93ed2f47c41803268bdd91c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-07-30T08:38:28+00:00",
      "cve": "CVE-2025-68167",
      "id": "CVE-2025-68167",
      "initial_release_date": "2025-12-16T00:00:00+00:00",
      "product_status:known_affected": "90",
      "product_status:known_not_affected": "184",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: gpiolib: fix invalid pointer access in debugfs",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-68167.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-07-31T00:59:05Z",
      "cve": "CVE-2025-68167",
      "id": "CVE-2025-68167",
      "initial_release_date": "2025-12-17T00:26:27Z",
      "product_status:first_fixed": "2",
      "product_status:known_affected": "394",
      "product_status:known_not_affected": "415",
      "product_status:recommended": "172",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2025-68167",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2025-68167.json",
      "version": "18"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…