CVE-2026-6685: Unsigned-subtraction wrap in FatFs dirty-cache handling
- Vendor
- Elm-Chan
CVE-2026-6685 affects FatFs R0.16 and earlier. The vulnerability is an unsigned-subtraction wraparound in dirty-cache handling in the f_read() and f_write() paths, specifically involving the expression fp->sect - sect < cc during interleaved read/write activity on fragmented filesystems. Under affected conditions, the arithmetic underflow causes stale dirty-cache skip behavior and can lead to out-of-bounds memory effects and silent corruption during filesystem operations.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation can compromise data integrity and availability. Reported effects include stale cache behavior, incorrect writes, filesystem corruption, silent data corruption, and memory corruption during read/write operations on fragmented volumes. In embedded deployments, this is particularly dangerous for logging, storage, and control systems because corruption may be silent rather than immediately crashing the device.
Mitigation
If you can’t patch tonight, do this now.
Until a fixed version is available and deployed, reduce exposure to untrusted FAT media and images, especially removable USB and SD storage. Avoid or restrict processing of attacker-supplied fragmented filesystems, limit physical access to media interfaces, and review downstream integrations that permit interleaved read/write operations on untrusted storage volumes.
Remediation
Patch, then assume compromise.
Upgrade to a fixed FatFs release newer than R0.16 once available. Because FatFs is widely vendored into downstream SDKs and firmware stacks, implementers should also audit bundled copies in dependent platforms and products and apply vendor-specific patches where upstream updates are not yet available.
Exploits
No public exploits tracked yet. Mallory keeps watching.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2026-6685 exploited in the wild?
- As of Sep 25, 2026, Mallory has no reports of CVE-2026-6685 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2026-6685?
- Yes. As of Sep 25, 2026, Mallory has reports of a public exploit for CVE-2026-6685.
- Is there a patch for CVE-2026-6685?
- Upgrade to a fixed FatFs release newer than R0.16 once available. Because FatFs is widely vendored into downstream SDKs and firmware stacks, implementers should also audit bundled copies in dependent platforms and products and apply vendor-specific patches where upstream updates are not yet available.
- What products are affected by CVE-2026-6685?
- Elm-Chan Fatfs.
Recent activity
11 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.