{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99967","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.449Z","datePublished":"2026-11-30T13:18:43.513Z","dateUpdated":"2026-11-30T13:18:43.513Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-11-30T13:18:43.513Z"},"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 <fcntl.h>\n    #include <stdio.h>\n    #include <sys/mman.h>\n    #include <sys/stat.h>\n    #include <unistd.h>\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 << 20));\n            fstat(fd, &st);\n            printf(\"blocks: %ld\\n\", (long)st.st_blocks);\n            printf(\"ftruncate: %d\\n\", ftruncate(fd, 1 << 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."}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/file.c"],"versions":[{"version":"82a81a7352bcf5f2756ac33d47ee0582737e9a85","lessThan":"ea6fbcebee22a96387314341f4b9386873d91e39","status":"affected","versionType":"git"},{"version":"82a81a7352bcf5f2756ac33d47ee0582737e9a85","lessThan":"b4c282c0d82e8715ea9ed0b35813a3f365e3f952","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/file.c"],"versions":[{"version":"7.2","status":"affected"},{"version":"0","lessThan":"7.2","status":"unaffected","versionType":"semver"},{"version":"7.3.4","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"7.2","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/ea6fbcebee22a96387314341f4b9386873d91e39"},{"url":"https://git.kernel.org/stable/c/b4c282c0d82e8715ea9ed0b35813a3f365e3f952"}],"title":"exfat: free clusters beyond EOF when a write fails or is short","x_generator":{"engine":"bippy-1.2.0"}}}}