Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-8] src/usr.sbin/installboot/arch
Module Name: src
Committed By: martin
Date: Sun Jun 24 09:32:03 UTC 2018
Modified Files:
src/usr.sbin/installboot/arch [netbsd-8]: i386.c
Log Message:
Pull up following revision(s) (requested by kamil in ticket #898):
usr.sbin/installboot/arch/i386.c: revision 1.41
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.40.20.1 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