On Wed, Aug 29, 2018 at 10:51:14AM +1200, Chris Packham wrote: > From: Mark Tomlinson <mark.tomlin...@alliedtelesis.co.nz> > > The set_header call in kwbimage.c adds a checksum to the end of the > image in addition to setting up the header. It 'helpfully' updates the > st_size to match the fact that the file is now longer. However, mkimage > uses this length in the munmap call. This can lead to unmapping an extra > page, of perhaps required data. When this happens, a SEGV can occur. > > To prevent this from happening, the munmap call now uses the same length > that was passed to mmap. This could also have been fixed by not changing > the length in kwbimage.c, however changing it in the main file means > that other plugins will also not fall for the same trap. > > Signed-off-by: Mark Tomlinson <mark.tomlin...@alliedtelesis.co.nz> > Signed-off-by: Chris Packham <judge.pack...@gmail.com> > [cp: resolve checkpatch complaints] > Tested-by: Chris Packham <judge.pack...@gmail.com>
Applied to u-boot/master, thanks! -- Tom
signature.asc
Description: PGP signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot