[syslinux] isolinux.bin checksum

Thomas Schmitt scdbackup at gmx.net
Tue Jan 9 11:29:39 PST 2018


Ady wrote:
> This is a quote from Wonko/Jaclaz, who has also been investigation this 
> issue and deserves credit for it:
> Ok, not that I understand the code, but what *somehow* happens is that 
> the "embedded" checksum in Isolinux.bin (starting from 4.00) is the 
> checksum of the WHOLE file (i.e. starting from offset 0 instead of 64) 
> at a time when:
> 1) the dword at offset 0x10 (bi_length) is still 0xDEAFBEEF
> 2) the dword at offset 0x14 (bi_csum) is still 0xDEADBEEF
> [...] Credits also go to Erwan.L.

Slapping hand against forehead: I should have come to the idea to restore
the initial byte pattern before testing with offset 0 instead of 64.

The observations match my theory about the missing addition of "start"
when beginning the checksum loop, if "start" is 64.

> Since I am not a developer, I cannot avoid wondering whether patching 
> prepcore.c would have additional consequences.

The change should only influence the checksum, which can hardly get worse.

It comes to me that a run of old checksumiso.pl should have the same
effect as putting isolinux.bin into an ISO. I.e. test would be whether
the four bytes at offset 20 of a freshly built isolinux change by a run
of checksumiso.pl.
If they don't change, then we have a high probability of correct code
in prepcore.c.

Have a nice day :)


More information about the Syslinux mailing list