{"id":"CVE-2026-139234","state":"PUBLISHED","title":"exfat: fix used_clusters accounting during cluster allocation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nexfat: fix used_clusters accounting during cluster allocation\n\nIn the current exfat_alloc_cluster(), p_chain->size is incremented as\neach cluster is allocated so that the partially allocated chain can\nbe freed by __exfat_free_cluster() on the error path.\n\nHowever, sbi->used_clusters is still updated only after all clusters\nhave been allocated, while __exfat_free_cluster() unconditionally\nsubtracts the number of freed clusters from sbi->used_clusters.\nTherefore, when allocation fails partway through, the partially\nallocated clusters are subtracted from sbi->used_clusters even\nthough they were never added to it. This corrupts the free-space\naccounting and can cause sbi->used_clusters to underflow.\n\nIncrement sbi->used_clusters together with p_chain->size as each\ncluster is allocated. This keeps the accounting consistent with\n__exfat_free_cluster() on both the success and error paths.\n\nThis issue is caught by generic/476 with 256k cluster size:\n\n    Ran: generic/476\n    Failures: generic/476\n    Failed 1 of 1 tests\n\n    *** fsck.exfat output ***\n    ERROR: <path>: more clusters are allocated. truncate to N bytes\n    ...\n    /dev/vdc: corrupted. directories 331, files 526\n    /dev/vdc: files corrupted 9, files fixed 0\n    *** end fsck.exfat output ***","publishedAt":"2026-11-30T13:32:51.780Z","updatedAt":"2026-11-30T13:32:51.780Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27","status":"affected","lessThan":"b0825472aeb9deb458296071c81d6396b0d20677","versionType":"git"},{"version":"d5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27","status":"affected","lessThan":"8dd879d08328fdf47a29700b89015a8dca53aefd","versionType":"git"},{"version":"d5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27","status":"affected","lessThan":"fabe14fd8555ae8bc5933df390e548d77e7336fd","versionType":"git"},{"version":"d5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27","status":"affected","lessThan":"cb9dbf8a4e34b4fdf311598835ab4d76ed7e07c1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/fatent.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/fatent.c"]}],"references":["https://git.kernel.org/stable/c/b0825472aeb9deb458296071c81d6396b0d20677","https://git.kernel.org/stable/c/8dd879d08328fdf47a29700b89015a8dca53aefd","https://git.kernel.org/stable/c/fabe14fd8555ae8bc5933df390e548d77e7336fd","https://git.kernel.org/stable/c/cb9dbf8a4e34b4fdf311598835ab4d76ed7e07c1"],"weaknesses":[],"ingestedAt":"2026-11-30T13:46:04.484Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139234.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139234","state":"PUBLISHED","datePublished":"2026-11-30T13:32:51.780Z","dateUpdated":"2026-11-30T13:32:51.780Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.922Z"},"containers":{"cna":{"title":"exfat: fix used_clusters accounting during cluster allocation","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nexfat: fix used_clusters accounting during cluster allocation\n\nIn the current exfat_alloc_cluster(), p_chain->size is incremented as\neach cluster is allocated so that the partially allocated chain can\nbe freed by __exfat_free_cluster() on the error path.\n\nHowever, sbi->used_clusters is still updated only after all clusters\nhave been allocated, while __exfat_free_cluster() unconditionally\nsubtracts the number of freed clusters from sbi->used_clusters.\nTherefore, when allocation fails partway through, the partially\nallocated clusters are subtracted from sbi->used_clusters even\nthough they were never added to it. This corrupts the free-space\naccounting and can cause sbi->used_clusters to underflow.\n\nIncrement sbi->used_clusters together with p_chain->size as each\ncluster is allocated. This keeps the accounting consistent with\n__exfat_free_cluster() on both the success and error paths.\n\nThis issue is caught by generic/476 with 256k cluster size:\n\n    Ran: generic/476\n    Failures: generic/476\n    Failed 1 of 1 tests\n\n    *** fsck.exfat output ***\n    ERROR: <path>: more clusters are allocated. truncate to N bytes\n    ...\n    /dev/vdc: corrupted. directories 331, files 526\n    /dev/vdc: files corrupted 9, files fixed 0\n    *** end fsck.exfat output ***"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"d5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27","status":"affected","lessThan":"b0825472aeb9deb458296071c81d6396b0d20677","versionType":"git"},{"version":"d5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27","status":"affected","lessThan":"8dd879d08328fdf47a29700b89015a8dca53aefd","versionType":"git"},{"version":"d5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27","status":"affected","lessThan":"fabe14fd8555ae8bc5933df390e548d77e7336fd","versionType":"git"},{"version":"d5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27","status":"affected","lessThan":"cb9dbf8a4e34b4fdf311598835ab4d76ed7e07c1","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/fatent.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.3","versionType":"semver"},{"version":"6.12.120","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.66","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/exfat/fatent.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b0825472aeb9deb458296071c81d6396b0d20677"},{"url":"https://git.kernel.org/stable/c/8dd879d08328fdf47a29700b89015a8dca53aefd"},{"url":"https://git.kernel.org/stable/c/fabe14fd8555ae8bc5933df390e548d77e7336fd"},{"url":"https://git.kernel.org/stable/c/cb9dbf8a4e34b4fdf311598835ab4d76ed7e07c1"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:32:51.780Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.12.120"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"6.18.66"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}