CVE-2026-139234

exfat: fix used_clusters accounting during cluster allocation

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

exfat: fix used_clusters accounting during cluster allocation

In the current exfat_alloc_cluster(), p_chain->size is incremented as
each cluster is allocated so that the partially allocated chain can
be freed by __exfat_free_cluster() on the error path.

However, sbi->used_clusters is still updated only after all clusters
have been allocated, while __exfat_free_cluster() unconditionally
subtracts the number of freed clusters from sbi->used_clusters.
Therefore, when allocation fails partway through, the partially
allocated clusters are subtracted from sbi->used_clusters even
though they were never added to it. This corrupts the free-space
accounting and can cause sbi->used_clusters to underflow.

Increment sbi->used_clusters together with p_chain->size as each
cluster is allocated. This keeps the accounting consistent with
__exfat_free_cluster() on both the success and error paths.

This issue is caught by generic/476 with 256k cluster size:

Ran: generic/476
Failures: generic/476
Failed 1 of 1 tests

*** fsck.exfat output ***
ERROR: <path>: more clusters are allocated. truncate to N bytes
...
/dev/vdc: corrupted. directories 331, files 526
/dev/vdc: files corrupted 9, files fixed 0
*** end fsck.exfat output ***

Analysis

AI-generated

Technical impact

An inconsistency in the exfat file system’s cluster allocation routine allows the internal counter that tracks used clusters to under‑flow. When a cluster allocation fails after some clusters have already been tentatively committed, the code later subtracts the total number of freed clusters from the counter, even though those clusters were never added. This mis‑accounting corrupts the free‑space bookkeeping used by subsequent exfat operations, potentially leading to data corruption or denial of storage services when the system believes more space is available than actually is. The flaw is a classic integer underflow vulnerability (CWE‑191).

Affected Systems

The bug affects the Linux kernel’s exfat file-system driver. All Linux kernel builds that include the exfat module and do not yet incorporate the accounting fix are vulnerable. Consequently, any system running a legacy kernel that mounts exfat volumes is impacted. The affected variant is the kernel itself; no specific version ranges are listed, so the assumption is all unpatched kernel versions.

Risk and Exploitability

The flaw is a classic integer underflow (CWE‑191) that corrupts free‑space tracking. If an attacker can provoke an allocation failure while writing to an exfat filesystem, the kernel may subtract a cluster count that was never added, causing the used_clusters counter to underflow. This leads to corrupted file‑system metadata, potential data loss, and degraded storage services. The CVSS score is not specified in the public data, but the lack of an EPSS score and KEV listing implies no known public exploits yet. Attackers would likely need local write access to cause the fault, so the mode of exploitation is primarily local. Nonetheless, attackers with elevated privileges or in a multi‑tenant environment could simulate the failure. Because the vulnerability affects internal bookkeeping rather than user controls, the impact is confined to the system on which the kernel runs and does not allow privilege escalation across machines.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the exfat accounting fix
  • Restart the system or reload the kernel to ensure the new code is in use
  • Run fsck.exfat on all exfat volumes to repair any previously corrupted space allocations

Generated by OpenCVE AI on December 1, 2026 at 10:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-191
Type Values Removed Values Added
Weaknesses CWE-191
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: exfat: fix used_clusters accounting during cluster allocation In the current exfat_alloc_cluster(), p_chain->size is incremented as each cluster is allocated so that the partially allocated chain can be freed by __exfat_free_cluster() on the error path. However, sbi->used_clusters is still updated only after all clusters have been allocated, while __exfat_free_cluster() unconditionally subtracts the number of freed clusters from sbi->used_clusters. Therefore, when allocation fails partway through, the partially allocated clusters are subtracted from sbi->used_clusters even though they were never added to it. This corrupts the free-space accounting and can cause sbi->used_clusters to underflow. Increment sbi->used_clusters together with p_chain->size as each cluster is allocated. This keeps the accounting consistent with __exfat_free_cluster() on both the success and error paths. This issue is caught by generic/476 with 256k cluster size: Ran: generic/476 Failures: generic/476 Failed 1 of 1 tests *** fsck.exfat output *** ERROR: <path>: more clusters are allocated. truncate to N bytes ... /dev/vdc: corrupted. directories 331, files 526 /dev/vdc: files corrupted 9, files fixed 0 *** end fsck.exfat output ***
Title exfat: fix used_clusters accounting during cluster allocation
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

No weakness.

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:32 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM