Update fatfs r016#2004
Open
benma wants to merge 3 commits into
Open
Conversation
Update the vendored FatFs copy from R0.14b to R0.16 plus upstream patch 1. - Base archive: https://elm-chan.org/fsw/ff/arc/ff16.zip - https://elm-chan.org/fsw/ff/patch/ff16p1.diff Keep the existing BitBox configuration choices for LFN, tiny mode, mkfs support, code page 850, fixed timestamps, and disabled exFAT, labels, and LBA64.
Reject mounted FAT volumes whose FAT area extends past the computed data area. This catches crafted FAT32 BPB values where the FatFs mount calculation can wrap `BPB_FATSz32 * NumFATs` and place the data area inside attacker-controlled FAT sectors. Addresses CVE-2026-6682 at the BitBox SD integration boundary without changing vendored FatFs code.
Reject files larger than SD_MAX_FILE_SIZE before the erase path overwrites them. The read path already enforced this limit; applying it to erase prevents a malformed FAT directory entry from causing an excessive overwrite loop. This mitigates the BitBox impact of CVE-2026-6682 in the stale-backup cleanup path without changing vendored FatFs code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I manually tested listing, reading, writing.