Am 28. Juli 2023 03:51:55 MESZ schrieb Simon Glass :
>Hi,
>
>On Thu, 27 Jul 2023 at 08:36, Dan Carpenter wrote:
>>
>> On Thu, Jul 27, 2023 at 11:22:15AM +0300, Ilias Apalodimas wrote:
>> > Hi Dan,
>> >
>> > [...]
>> >
>> > > @@ -313,7 +313,7 @@ static int cmp_pe_section(const void *arg1, const
Hi,
On Thu, 27 Jul 2023 at 08:36, Dan Carpenter wrote:
>
> On Thu, Jul 27, 2023 at 11:22:15AM +0300, Ilias Apalodimas wrote:
> > Hi Dan,
> >
> > [...]
> >
> > > @@ -313,7 +313,7 @@ static int cmp_pe_section(const void *arg1, const
> > > void *arg2)
> > > *
> > > * Return: valid pointer to a
On Thu, Jul 27, 2023 at 11:22:15AM +0300, Ilias Apalodimas wrote:
> Hi Dan,
>
> [...]
>
> > @@ -313,7 +313,7 @@ static int cmp_pe_section(const void *arg1, const void
> > *arg2)
> > *
> > * Return: valid pointer to a image, return NULL if allocation fails.
> > */
> > -void *efi_prepare_al
The issue is this line:
new_efi = efi_prepare_aligned_image(efi, (u64 *)&efi_size);
The efi_size variable is type size_t and on a 32 bit system that's 32
bits. The u64 type is obviously 64 bits. So we write 8 bytes to a 4
byte buffer which corrupts memory.
Fix this by changing the type
Hi Dan,
[...]
> @@ -313,7 +313,7 @@ static int cmp_pe_section(const void *arg1, const void
> *arg2)
> *
> * Return: valid pointer to a image, return NULL if allocation fails.
> */
> -void *efi_prepare_aligned_image(void *efi, u64 *efi_size)
> +void *efi_prepare_aligned_image(void *efi,
5 matches
Mail list logo