[syslinux] Possible memdisk issue

H. Peter Anvin hpa at zytor.com
Wed Jul 9 14:10:09 PDT 2014


On 07/09/2014 01:54 PM, Alexander Perlis wrote:
> file system has 2 16-bit FATs and 4 sectors per cluster.
> FAT size is 16 sectors, and provides 4085 clusters.

It is worth noting that 4085 is literally the smallest number of
clusters that a FAT16 filesystem can have, and the FAT format is
determined by the cluster count, so an off-by-one error in FreeDOS could
definitely cause a crash here.

In fact, the FAT specification recommends avoiding generating FAT
filesystems which are within ±16 clusters of the cutoff values of
4084/4085 and 65524/65525, at the very least by default.  This might be
worth introducing in mkdosfs.  I have to admit to having written a chunk
of that code long ago.  It is pretty darn hideous.

	-hpa




More information about the Syslinux mailing list