[ipxe-devel] [PATCH] [cpio] Change truncated initramfs detection
Brandon Penglase
bpenglase-ipxe at Spaceservices.net
Tue Oct 30 04:10:02 UTC 2012
Looks to be working to me, through pxelinux with Shao's patches
applied, and straight up with ipxe.
Brandon
On Tue, 30 Oct 2012 02:35:45 +0000
Michael Brown <mbrown at fensystems.co.uk> wrote:
> On Friday 26 Oct 2012 01:12:31 Shao Miller wrote:
> > Subject: [PATCH] [cpio] Change truncated initramfs detection
> >
> > When Syslinux prepares an initramfs "initrd", the last file blob
> > will not be padded to an initramfs alignment boundary. We now
> > determine that the initrd is truncated based on the unaligned
> > length of the file data.
>
> I think there's a corner case that could result in a crash: if
> cpio_len < len but cpio_align(cpio_len) > len, then len would
> underflow and bad things would happen.
>
> Attached is a slightly modified patch which I think should still
> solve the problem, while guaranteeing that len cannot underflow.
>
> Could you or Brandon test and let me know if this patch also works?
>
> Thanks,
>
> Michael
More information about the ipxe-devel
mailing list