Re: [PATCH] efi_loader: don't load beyond VirtualSize

2021-02-09 Thread Asherah Connor
Hi Heinrich. Thanks for the review! On 21/02/09 07:02:p, Heinrich Schuchardt wrote: > Thank you for reporting and addressing the issue. > > Is this patch related to an observed problem or is it resulting from > code review? Yes, this was seen in action (and took quite a bit of logging and

[PATCH] efi_loader: don't load beyond VirtualSize

2021-02-09 Thread Asherah Connor
PE section table entries' SizeOfRawData must be a multiple of FileAlignment, and thus may be rounded up and larger than their VirtualSize. We should not load beyond the VirtualSize, which is "the total size of the section when loaded into memory" -- we may clobber real data at the target in some

Re: [PATCH] efi_loader: don't load beyond VirtualSize

2021-02-08 Thread Heinrich Schuchardt
On 2/9/21 7:48 AM, Heinrich Schuchardt wrote: Am 9. Februar 2021 07:19:48 MEZ schrieb Asherah Connor : PE section table entries' SizeOfRawData must be a multiple of FileAlignment, and thus may be rounded up and larger than their VirtualSize. We should not load beyond the VirtualSize, which is

Re: [PATCH] efi_loader: don't load beyond VirtualSize

2021-02-08 Thread Heinrich Schuchardt
Am 9. Februar 2021 07:19:48 MEZ schrieb Asherah Connor : >PE section table entries' SizeOfRawData must be a multiple of >FileAlignment, and thus may be rounded up and larger than their >VirtualSize. > >We should not load beyond the VirtualSize, which is "the total size of >the section when loaded