Skip to content
Heist/ feed
Back to feed
UnratedFix available

exfat: fix improper check of dentry.stream.valid_size

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: exfat: fix improper check of dentry.stream.valid_size We found an infinite loop bug in the exFAT file system that can lead to a Denial-of-Service (DoS) condition. When a dentry in an exFAT filesystem is malformed, the following system calls — SYS_openat, SYS_ftruncate, and SYS_pwrite64 — can cause the kernel to hang. Root cause analysis shows that the size validation code in exfat_find() does not check whether dentry.stream.valid_size is negative. As a result, the system calls mentioned above can succeed and eventually trigger the DoS issue. This patch adds a check for negative dentry.stream.valid_size to prevent this vulnerability.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.59, 6.17.9
CVEs
CVE-2025-40287
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 14:42 UTC · Revision 1

Source evidence

exfat: fix improper check of dentry.stream.valid_size

core-osv · Original source

Published 6 Dec 2025, 21:51 UTC

In the Linux kernel, the following vulnerability has been resolved: exfat: fix improper check of dentry.stream.valid_size We found an infinite loop bug in the exFAT file system that can lead to a Denial-of-Service (DoS) condition. When a dentry in an exFAT filesystem is malformed, the following system calls — SYS_openat, SYS_ftruncate, and SYS_pwrite64 — can cause the kernel to hang. Root cause analysis shows that the size validation code in exfat_find() does not check whether dentry.stream.valid_size is negative. As a result, the system calls mentioned above can succeed and eventually trigger the DoS issue. This patch adds a check for negative dentry.stream.valid_size to prevent this vulnerability.

osv:CVE-2025-40287

Kernel

Fixed versions: 6.12.59, 6.17.9

Complete source record
{
  "id": "e5a8da73d4c7d9b72d27bf9a5945d12d1c7668fab0f6f473182bbe60aecf8f53",
  "url": "https://osv.dev/vulnerability/CVE-2025-40287",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "exfat: fix improper check of dentry.stream.valid_size",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: exfat: fix improper check of dentry.stream.valid_size We found an infinite loop bug in the exFAT file system that can lead to a Denial-of-Service (DoS) condition. When a dentry in an exFAT filesystem is malformed, the following system calls — SYS_openat, SYS_ftruncate, and SYS_pwrite64 — can cause the kernel to hang. Root cause analysis shows that the size validation code in exfat_find() does not check whether dentry.stream.valid_size is negative. As a result, the system calls mentioned above can succeed and eventually trigger the DoS issue. This patch adds a check for negative dentry.stream.valid_size to prevent this vulnerability.",
    "evidence": "osv:CVE-2025-40287",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.12.59",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.17.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-40287",
      "aliases": [
        "CVE-2025-40287"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "11a347fb6cef62ce47e84b97c45f2b2497c7593b"
                },
                {
                  "fixed": "6c627bcc1896ba62ec793d0c00da74f3c93ce3ad"
                },
                {
                  "fixed": "204b1b02ee018ba52ad2ece21fe3a8643d66a1b2"
                },
                {
                  "fixed": "82ebecdc74ff555daf70b811d854b1f32a296bea"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40287.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.8.0"
                },
                {
                  "fixed": "6.12.59"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.17.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40287.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:29.921864048Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/204b1b02ee018ba52ad2ece21fe3a8643d66a1b2",
        "https://git.kernel.org/stable/c/6c627bcc1896ba62ec793d0c00da74f3c93ce3ad",
        "https://git.kernel.org/stable/c/82ebecdc74ff555daf70b811d854b1f32a296bea",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40287.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-40287",
        "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/40xxx/CVE-2025-40287.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-40287",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 496452,
  "published_at": "2025-12-06T21:51:13.328+00:00"
}