volume_id: off by one error detecting FAT16 vs FAT32

Thomas Frauendorfer thomas.frauendorfer at gmail.com
Thu Mar 14 16:37:46 UTC 2019


Busybox detects a FAT file system with 65524 clusters as FAT32 while
it should handle it as FAT16. Because of that blkid cannot detect the
uuid or label on a FAT with 65524 clusters.

The attached patch fixes that mistake.

The cluster count values are defined in:
Microsoft Extensible Firmware Initiative
FAT32 File System Specification
FAT: General Overview of On-Disk Format

I used version 1.03 from December 6,2000

The cluster count values are defined in pages 14 and 15 of that specification.

Most users will probably not encounter that bug because the
specification also states that file system creation code should stay
away at least 16 clusters from that cluster count to avoid bugs in
incorrect FAT code.

Kind regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-off-by-one-error-in-FAT16-FAT32-detection.patch
Type: text/x-patch
Size: 1093 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190314/7c1f9cca/attachment.bin>

More information about the busybox mailing list