GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2025-38082 (GCVE-0-2025-38082)

Vulnerability from cvelistv5 – Published: 2025-06-18 09:35 – Updated: 2026-08-05 11:59
VLAI
Title
gpio: virtuser: fix potential out-of-bound write
Summary
In the Linux kernel, the following vulnerability has been resolved: gpio: virtuser: fix potential out-of-bound write If the caller wrote more characters, count is truncated to the max available space in "simple_write_to_buffer". Check that the input size does not exceed the buffer size. Write a zero termination afterwards.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 91581c4b3f29e2e22aeb1a62e842d529ca638b2d , < afe090366f470f77e140ff3407db813f57852c04 (git)
Affected: 91581c4b3f29e2e22aeb1a62e842d529ca638b2d , < b96feaaa0fda1e3871b438143c3446954b32d3a7 (git)
Affected: 91581c4b3f29e2e22aeb1a62e842d529ca638b2d , < 7118be7c6072f40391923543fdd1563b8d56377c (git)
guessed Create a notification for this product.
Linux Linux Affected: 6.11
Unaffected: 0 , < 6.11 (semver)
Unaffected: 6.12.32 , ≤ 6.12.* (semver)
Unaffected: 6.14.10 , ≤ 6.14.* (semver)
Unaffected: 6.15 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpio/gpio-virtuser.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "afe090366f470f77e140ff3407db813f57852c04",
              "status": "affected",
              "version": "91581c4b3f29e2e22aeb1a62e842d529ca638b2d",
              "versionType": "git"
            },
            {
              "lessThan": "b96feaaa0fda1e3871b438143c3446954b32d3a7",
              "status": "affected",
              "version": "91581c4b3f29e2e22aeb1a62e842d529ca638b2d",
              "versionType": "git"
            },
            {
              "lessThan": "7118be7c6072f40391923543fdd1563b8d56377c",
              "status": "affected",
              "version": "91581c4b3f29e2e22aeb1a62e842d529ca638b2d",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/gpio/gpio-virtuser.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.11"
            },
            {
              "lessThan": "6.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.32",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.14.*",
              "status": "unaffected",
              "version": "6.14.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.15",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.32",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14.10",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ngpio: virtuser: fix potential out-of-bound write\n\nIf the caller wrote more characters, count is truncated to the max\navailable space in \"simple_write_to_buffer\". Check that the input\nsize does not exceed the buffer size. Write a zero termination\nafterwards."
        }
      ],
      "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 bug is reached only via a `write(2)`/`pwrite(2)` syscall on the local debugfs files `/sys/kernel/debug/gpio-virtuser/\u003cdev\u003e/\u003cline\u003e/direction` and `.../consumer`. There is no network, remote-peer, or over-the-air input path into the gpio-virtuser driver.\nAC:L - A single unconditional write triggers it deterministically \u2014 a 32-byte write to `direction` guarantees an unterminated buffer and a one-byte OOB store past `buf[32]`, and a zero-length write to `consumer` guarantees `buf[strlen(buf)-1]` evaluates to `buf[-1]` on default `INIT_STACK_ALL_ZERO` kernels. There is no race, no timing window, and no memory-layout precondition outside the attacker\u0027s influence, since the attacker controls both the write length and every byte.\nPR:L - The debugfs nodes are mode 0644 and debugfs defaults to a 0700 root, but the `uid=`/`gid=`/`mode=` mount options and vendor chown policies commonly delegate debugfs to non-root system accounts on the embedded/industrial/automotive boards where a GPIO test-consumer device is instantiated, so a low-privileged local account is the realistic worst case \u2014 consistent with prior kernel CNA debugfs scoring (CVE-2025-38317, CVE-2025-38307).\nUI:N - The attacker performs the write entirely on their own; no victim action, mount, or file-open by another user is required.\nS:U - The corruption and disclosure occur in kernel stack/heap memory within the same kernel security authority, with no VM, IOMMU, or sandbox boundary crossed.\nC:H - `strim()` and `strlen()` read out of bounds past the stack buffer, and the unterminated buffer is handed to `gpiod_set_consumer_name()` \u2192 `desc_set_label()`, which `strcpy()`s the out-of-bounds stack bytes into a label exported to userspace through the debugfs `consumer` read and `GPIO_V2_GET_LINEINFO_IOCTL`; a `pwrite` at offset 31 leaks up to 31 bytes of uninitialized kernel stack, which can contain pointers and defeat KASLR.\nI:H - This is an out-of-bounds write \u2014 a NUL byte stored past the end of `buf[32]` in `direction`, and below the array (`buf[-1]`) or beyond it in `consumer` \u2014 at an offset the attacker can influence by grooming the kernel stack with prior syscalls, yielding a classic poison-NUL-byte primitive able to truncate an adjacent saved pointer or length field into a control-flow hijack.\nA:H - Corrupting adjacent stack locals, the stack-protector canary, or the frame of neighboring calls produces `__stack_chk_fail()` panics or oopses, and the OOB `strlen()` walk can fault; the attacker can repeat the write at will to guarantee a crash."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:59:20.241Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/afe090366f470f77e140ff3407db813f57852c04"
        },
        {
          "url": "https://git.kernel.org/stable/c/b96feaaa0fda1e3871b438143c3446954b32d3a7"
        },
        {
          "url": "https://git.kernel.org/stable/c/7118be7c6072f40391923543fdd1563b8d56377c"
        }
      ],
      "title": "gpio: virtuser: fix potential out-of-bound write",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38082",
    "datePublished": "2025-06-18T09:35:41.902Z",
    "dateReserved": "2025-04-16T04:51:23.981Z",
    "dateUpdated": "2026-08-05T11:59:20.241Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-38082",
      "date": "2026-09-17",
      "epss": "0.00161",
      "percentile": "0.0567"
    },
    "microsoft_vex": {
      "current_release_date": "2025-09-04T01:55:27.000Z",
      "cve": "CVE-2025-38082",
      "id": "msrc_CVE-2025-38082",
      "initial_release_date": "2025-06-02T00:00:00.000Z",
      "product_status:under_investigation": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "gpio: virtuser: fix potential out-of-bound write",
      "url": "https://msrc.microsoft.com/csaf/vex/2025/msrc_cve-2025-38082.json",
      "version": "1"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2025-38082\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-06-18T10:15:41.890\",\"lastModified\":\"2026-07-30T06:22:49.067\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ngpio: virtuser: fix potential out-of-bound write\\n\\nIf the caller wrote more characters, count is truncated to the max\\navailable space in \\\"simple_write_to_buffer\\\". Check that the input\\nsize does not exceed the buffer size. Write a zero termination\\nafterwards.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: gpio: virtuser: correcci\u00f3n de una posible escritura fuera de l\u00edmite. Si el llamador escribi\u00f3 m\u00e1s caracteres, el recuento se trunca al espacio m\u00e1ximo disponible en \\\"simple_write_to_buffer\\\". Compruebe que el tama\u00f1o de entrada no supere el tama\u00f1o del b\u00fafer. Escriba una terminaci\u00f3n de cero despu\u00e9s.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/gpio/gpio-virtuser.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"91581c4b3f29e2e22aeb1a62e842d529ca638b2d\",\"lessThan\":\"afe090366f470f77e140ff3407db813f57852c04\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"91581c4b3f29e2e22aeb1a62e842d529ca638b2d\",\"lessThan\":\"b96feaaa0fda1e3871b438143c3446954b32d3a7\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"91581c4b3f29e2e22aeb1a62e842d529ca638b2d\",\"lessThan\":\"7118be7c6072f40391923543fdd1563b8d56377c\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/gpio/gpio-virtuser.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.11\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.11\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.12.32\",\"lessThanOrEqual\":\"6.12.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.14.10\",\"lessThanOrEqual\":\"6.14.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.15\",\"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},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"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}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-787\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.11\",\"versionEndExcluding\":\"6.12.32\",\"matchCriteriaId\":\"4A0B0CEE-D47B-434F-86D9-03E1CFBEF1AD\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.13\",\"versionEndExcluding\":\"6.14.10\",\"matchCriteriaId\":\"DB4249FA-EF24-4488-A579-B8E8EE87EA6F\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.15:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"8D465631-2980-487A-8E65-40AE2B9F8ED1\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.15:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"4C9D071F-B28E-46EC-AC61-22B913390211\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.15:rc3:*:*:*:*:*:*\",\"matchCriteriaId\":\"13FC0DDE-E513-465E-9E81-515702D49B74\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.15:rc4:*:*:*:*:*:*\",\"matchCriteriaId\":\"8C7B5B0E-4EEB-48F5-B4CF-0935A7633845\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.15:rc5:*:*:*:*:*:*\",\"matchCriteriaId\":\"2D240580-3048-49B2-9E27-F115A9DF8224\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.15:rc6:*:*:*:*:*:*\",\"matchCriteriaId\":\"90320558-E553-4EF5-8A0B-0F5D20113BD2\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/7118be7c6072f40391923543fdd1563b8d56377c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/afe090366f470f77e140ff3407db813f57852c04\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/b96feaaa0fda1e3871b438143c3446954b32d3a7\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:24:43+00:00",
      "cve": "CVE-2025-38082",
      "id": "CVE-2025-38082",
      "initial_release_date": "2025-06-18T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: gpio: virtuser: fix potential out-of-bound write",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-38082.json",
      "version": "3"
    }
  }
}



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…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…