FKIE_CVE-2026-99967

Vulnerability from fkie_nvd - Published: 2026-11-30 14:20 - Updated: 2026-11-30 14:20
Severity
Summary
In the Linux kernel, the following vulnerability has been resolved: exfat: free clusters beyond EOF when a write fails or is short Commit 82a81a7352bc ("exfat: add iomap buffered I/O support") and commit 867b9c96dc83 ("exfat: add iomap direct I/O support") made a write allocate the clusters for its whole range in one step. They also dropped exfat_write_failed(), which freed the clusters beyond the end of the file after a failed or short write. However, a write can stop early, for example when the process is killed or when a part of the buffer cannot be read. As of now, the clusters for the part that was not written stay allocated beyond the end of the file. exfat_cont_expand() does not expect them, so a later write or truncate that extends the file fails with ENOSPC. The directory entry records only the size of the file, so the space can be lost for good once the volume is unmounted. The issue can be reproduced on a 64M volume made by mkfs.exfat and mounted on /mnt, with a write of 1M from a buffer that has only its first 4K mapped: #include <fcntl.h> #include <stdio.h> #include <sys/mman.h> #include <sys/stat.h> #include <unistd.h> int main(void) { char *p = mmap(NULL, 8192, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); int fd = open("/mnt/f", O_CREAT | O_WRONLY, 0644); struct stat st; munmap(p + 4096, 4096); printf("write: %zd\n", write(fd, p, 1 << 20)); fstat(fd, &st); printf("blocks: %ld\n", (long)st.st_blocks); printf("ftruncate: %d\n", ftruncate(fd, 1 << 16)); return 0; } Before commit 82a81a7352bc ("exfat: add iomap buffered I/O support"), the result is: write: 4096 blocks: 8 ftruncate: 0 After that commit, the result is: write: 4096 blocks: 2048 ftruncate: -1 This patch will bring back exfat_write_failed() and call it when a write ends before the end of its range, so that the clusters beyond the end of the file are freed again. It waits for direct I/O in flight first, as exfat_setattr() does before it frees clusters.
Impacted products
Vendor Product Version

{
  "affected": [
    {
      "affectedData": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/exfat/file.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "ea6fbcebee22a96387314341f4b9386873d91e39",
              "status": "affected",
              "version": "82a81a7352bcf5f2756ac33d47ee0582737e9a85",
              "versionType": "git"
            },
            {
              "lessThan": "b4c282c0d82e8715ea9ed0b35813a3f365e3f952",
              "status": "affected",
              "version": "82a81a7352bcf5f2756ac33d47ee0582737e9a85",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/exfat/file.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "7.2"
            },
            {
              "lessThan": "7.2",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.3.*",
              "status": "unaffected",
              "version": "7.3.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.4-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
    }
  ],
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nexfat: free clusters beyond EOF when a write fails or is short\n\nCommit 82a81a7352bc (\"exfat: add iomap buffered I/O support\") and commit\n867b9c96dc83 (\"exfat: add iomap direct I/O support\") made a write\nallocate the clusters for its whole range in one step. They also dropped\nexfat_write_failed(), which freed the clusters beyond the end of the\nfile after a failed or short write.\n\nHowever, a write can stop early, for example when the process is killed\nor when a part of the buffer cannot be read. As of now, the clusters for\nthe part that was not written stay allocated beyond the end of the file.\nexfat_cont_expand() does not expect them, so a later write or truncate\nthat extends the file fails with ENOSPC. The directory entry records\nonly the size of the file, so the space can be lost for good once the\nvolume is unmounted.\n\nThe issue can be reproduced on a 64M volume made by mkfs.exfat and\nmounted on /mnt, with a write of 1M from a buffer that has only its\nfirst 4K mapped:\n\n    #include \u003cfcntl.h\u003e\n    #include \u003cstdio.h\u003e\n    #include \u003csys/mman.h\u003e\n    #include \u003csys/stat.h\u003e\n    #include \u003cunistd.h\u003e\n\n    int main(void)\n    {\n            char *p = mmap(NULL, 8192, PROT_READ | PROT_WRITE,\n                           MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);\n            int fd = open(\"/mnt/f\", O_CREAT | O_WRONLY, 0644);\n            struct stat st;\n\n            munmap(p + 4096, 4096);\n            printf(\"write: %zd\\n\", write(fd, p, 1 \u003c\u003c 20));\n            fstat(fd, \u0026st);\n            printf(\"blocks: %ld\\n\", (long)st.st_blocks);\n            printf(\"ftruncate: %d\\n\", ftruncate(fd, 1 \u003c\u003c 16));\n            return 0;\n    }\n\nBefore commit 82a81a7352bc (\"exfat: add iomap buffered I/O support\"),\nthe result is:\n\n    write: 4096\n    blocks: 8\n    ftruncate: 0\n\nAfter that commit, the result is:\n\n    write: 4096\n    blocks: 2048\n    ftruncate: -1\n\nThis patch will bring back exfat_write_failed() and call it when a write\nends before the end of its range, so that the clusters beyond the end of\nthe file are freed again. It waits for direct I/O in flight first, as\nexfat_setattr() does before it frees clusters."
    }
  ],
  "id": "CVE-2026-99967",
  "lastModified": "2026-11-30T14:20:36.303",
  "metrics": {},
  "published": "2026-11-30T14:20:36.303",
  "references": [
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/b4c282c0d82e8715ea9ed0b35813a3f365e3f952"
    },
    {
      "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "url": "https://git.kernel.org/stable/c/ea6fbcebee22a96387314341f4b9386873d91e39"
    }
  ],
  "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
  "vulnStatus": "Received"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

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.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    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.