FAT long filename
A FAT long filename is stored in directory slots preceding a short-name entry, with an 8-bit checksum linking the slots to that alias.
Coverage: the checksum is computed from the 11 raw short-name bytes, without a dot. It does not cover the long-name characters, file size, first cluster or file contents. Slot order and association checks are separate. [1]
In 80 constructed FAT12/FAT16 image cases read by GNU mtools 4.0.49, colliding aliases retained the old long name, name edits remained readable, and redirecting the first cluster returned donor bytes under the original name. Mismatched checksums fell back to the short name. These are controlled mutations, not measured media failures. [2]
Eight bits do not imply a universal 1/256 risk. Exhaustively enumerating F0000000TXT through F0099999TXT gives 24 to 686 aliases per checksum. Exactly 625 of 100,000 map to 37, which is also the checksum of LAAAAA~1TXT. This fraction applies only to uniform sampling within that constructed family. [3]
Reader policy matters: mtools retained the long name in eight reversed-slot cases; FatFs R0.16 patch-2 fell back to the short alias on the same images. Both readers returned donor bytes in all 12 cluster rebindings. Agreement between readers does not prove historical content identity. Linux v6.12's contrast remains source inspection, not a mounted-kernel experiment. [6] [5]
Relations
Limitations
- A readable name and a matching alias checksum do not authenticate the name-to-content mapping or establish recovery completeness. [2]
Citations
- Microsoft FAT specification v1.03 (2000), pp. 27-29 and 33: long entries, checksum and alias reuse
- Hesela: FAT long-name association, 80 native image cases and reproduction instructions
- Hesela: exact checksum histogram for 100,000 constructed short aliases
- Linux v6.12 fs/fat/dir.c: fat_parse_long, lines 273-327
- Hesela: identical FAT images across two readers, alias lookup and content identity
Further reading
Sources & caveats
- The same 80 constructed images were read by mtools and a pinned Zephyr-maintained FatFs build, repeated with optimized and sanitized binaries. No mounted kernel, physical media, FAT32 or exFAT test was performed.
- The histogram is exact finite enumeration, cross-checked in Python and two C builds; it is not a statistical sample of deployed filenames.