Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.sbin/installboot/arch



Module Name:    src
Committed By:   kamil
Date:           Sat Jun 23 14:15:57 UTC 2018

Modified Files:
        src/usr.sbin/installboot/arch: i386.c

Log Message:
Fix integer overflow in installboot(8)

Add a sanity check of the disk_buf first three bytes. The original code on
a disk with nul bytes was causing integer overflow and thus calling the
memcmp(3) functin in is_zero() with enormous length.

Verity that the 0th byte is JMP, 1th a signed byte >=9 to prevent overflow
and 2th byte NOP.

Add a comment explaining the check.

Detected with MKSANITIZER and ASan.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/installboot/arch/i386.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index