zephyr: document the FatFs security state of this tree
Rewrite the README section that tracked the runZero FatFs CVEs, now that upstream has published R0.16 patch-1 and patch-2 and those are applied here.
Record the three groups the CVEs now fall into: fixed upstream in patch-2 (CVE-2026-6682, -6683, -6687), fixed by a local delta that upstream is not expected to take (CVE-2026-6686, whose f_lseek behaviour upstream documents as undefined), and CVE-2026-6685, where the reported unsigned underflow is benign and we carry only a readability change. Each entry keeps its GHSA link, and the two CVEs that need no change here (-6684, -6688) stay listed with the reason.
The point of the section is unchanged: keep the divergence from a pristine ChaN release small, visible, and easy to shed when re-baselining onto a future FatFs version.
Assisted-By: Claude:opus-4.8 Signed-off-by: David Brown david.brown@linaro.org
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
This implementaion of file system is developed by ELM Chan https://elm-chan.org/fsw/ff/.
This is based on FAT file system specification. It provides an interface to physical storage management through its disk io API in diskio.c. The disk io interfaces are updated to interface with Zephyr flash memory management.
Current revision in the tree is 0.16
URL to current version: https://elm-chan.org/fsw/ff/arc/ff16.zip SHA256 20b07c8047b4976118f6488e9cd8c4b1126e0525479828986adca69bb31047d1
Security state of the FatFs sources in this tree
In 2026 runZero disclosed a set of FatFs vulnerabilities (CVE-2026-6682 .. CVE-2026-6688) affecting R0.16 as released. ff.c in this tree is the released R0.16 with upstream’s own patches applied on top, plus a small number of local deltas. Each of the three groups below is a self-contained commit or commits, so the local divergence stays auditable and easy to shed when re-baselining onto a future FatFs release.
Fixed by upstream (applied verbatim, see https://elm-chan.org/fsw/ff/patches.html):
R0.16 patch-1 (2025-09-13) is not a security fix; it lowers the minimum volume size to 64 sectors. It is applied only because patch-2 is published as a delta against a patch-1 tree.
R0.16 patch-2 (2026-07-10) is upstream’s response to three of the CVEs:
Fixed locally (not addressed upstream):
Upstream documents the expanded area as undefined and has not treated this as a defect, so this fix is expected to remain a local delta. It costs an O(size) zeroing write on an extending seek.
Not a defect, but touched for clarity:
This CVE reports the unsigned subtraction in
cached_sect - sect < ccas an integer underflow. The wrap is real but benign: it is the usual single-comparison range check, and a cached sector before the run wraps to a value that is not less than cc, so the branch correctly does not fire. This holds for both the 32-bit and 64-bit LBA_t. Upstream made no change here in patch-2. We carry only a readability change that spells out the lower bound explicitly; behaviour is unchanged and no fix is needed.Not carried: CVE-2026-6684 (GPT partition loop) is already bounded in R0.16; CVE-2026-6688 is a downstream-caller pattern addressed in the Zephyr tree, not in ff.c.