Skip to content
Heist/ feed
Back to feed
UnratedFix available

usb: gadget: configfs: Fix OOB read on empty string write

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: configfs: Fix OOB read on empty string write When writing an empty string to either 'qw_sign' or 'landingPage' sysfs attributes, the store functions attempt to access page[l - 1] before validating that the length 'l' is greater than zero. This patch fixes the vulnerability by adding a check at the beginning of os_desc_qw_sign_store() and webusb_landingPage_store() to handle the zero-length input case gracefully by returning immediately.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.241, 5.15.190, 5.4.297, 6.1.147, 6.12.40, 6.15.8, 6.6.100
CVEs
CVE-2025-38497
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 17:35 UTC · Revision 1

Source evidence

usb: gadget: configfs: Fix OOB read on empty string write

core-osv · Original source

Published 28 Jul 2025, 11:22 UTC

In the Linux kernel, the following vulnerability has been resolved: usb: gadget: configfs: Fix OOB read on empty string write When writing an empty string to either 'qw_sign' or 'landingPage' sysfs attributes, the store functions attempt to access page[l - 1] before validating that the length 'l' is greater than zero. This patch fixes the vulnerability by adding a check at the beginning of os_desc_qw_sign_store() and webusb_landingPage_store() to handle the zero-length input case gracefully by returning immediately.

osv:CVE-2025-38497

Kernel

Fixed versions: 5.4.297, 5.10.241, 5.15.190, 6.1.147, 6.6.100, 6.12.40, 6.15.8

Complete source record
{
  "id": "3995672052f40ec2304f82194eb6229467b7345db38db49926b56d2216b57d5b",
  "url": "https://osv.dev/vulnerability/CVE-2025-38497",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "usb: gadget: configfs: Fix OOB read on empty string write",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: usb: gadget: configfs: Fix OOB read on empty string write When writing an empty string to either 'qw_sign' or 'landingPage' sysfs attributes, the store functions attempt to access page[l - 1] before validating that the length 'l' is greater than zero. This patch fixes the vulnerability by adding a check at the beginning of os_desc_qw_sign_store() and webusb_landingPage_store() to handle the zero-length input case gracefully by returning immediately.",
    "evidence": "osv:CVE-2025-38497",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.4.297",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.241",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.190",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.147",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.100",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.40",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.15.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-38497",
      "aliases": [
        "CVE-2025-38497"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "87213d388e927aaa88b21d5ff7e1f75ca2288da1"
                },
                {
                  "fixed": "78b41148cfea2a3f04d87adf3a71b21735820a37"
                },
                {
                  "fixed": "d68b7c8fefbaeae8f065b84e40cf64baf4cc0c76"
                },
                {
                  "fixed": "15a87206879951712915c03c8952a73d6a74721e"
                },
                {
                  "fixed": "2798111f8e504ac747cce911226135d50b8de468"
                },
                {
                  "fixed": "58bdd5160184645771553ea732da5c2887fc9bd1"
                },
                {
                  "fixed": "783ea37b237a9b524f1e5ca018ea17d772ee0ea0"
                },
                {
                  "fixed": "22b7897c289cc25d99c603f5144096142a30d897"
                },
                {
                  "fixed": "3014168731b7930300aab656085af784edc861f6"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38497.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "3.16.0"
                },
                {
                  "fixed": "5.4.297"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.241"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.190"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.147"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.100"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.40"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.15.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38497.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:31.278136686Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/15a87206879951712915c03c8952a73d6a74721e",
        "https://git.kernel.org/stable/c/22b7897c289cc25d99c603f5144096142a30d897",
        "https://git.kernel.org/stable/c/2798111f8e504ac747cce911226135d50b8de468",
        "https://git.kernel.org/stable/c/3014168731b7930300aab656085af784edc861f6",
        "https://git.kernel.org/stable/c/58bdd5160184645771553ea732da5c2887fc9bd1",
        "https://git.kernel.org/stable/c/783ea37b237a9b524f1e5ca018ea17d772ee0ea0",
        "https://git.kernel.org/stable/c/78b41148cfea2a3f04d87adf3a71b21735820a37",
        "https://git.kernel.org/stable/c/d68b7c8fefbaeae8f065b84e40cf64baf4cc0c76",
        "https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html",
        "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38497.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-38497",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38497.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-38497",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 497873,
  "published_at": "2025-07-28T11:22:05.855+00:00"
}