* modules size in mkimage
@ 2015-10-31 7:02 Andrei Borzenkov
2015-11-04 11:21 ` Vladimir 'phcoder' Serbinenko
0 siblings, 1 reply; 4+ messages in thread
From: Andrei Borzenkov @ 2015-10-31 7:02 UTC (permalink / raw)
To: The development of GRUB 2
mkimage sets module size to aligned value; later it is used to actually
process it which /may/ lead to inconsistency (as any comparison is
against stored aligned size, not actual module size).
Same applies to all other embedded types actually. The only one that
does it right is pubkey.
Just to make sure I do not miss something obvious; otherwise I'll make a
patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: modules size in mkimage
2015-10-31 7:02 modules size in mkimage Andrei Borzenkov
@ 2015-11-04 11:21 ` Vladimir 'phcoder' Serbinenko
2015-11-04 11:26 ` Andrei Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2015-11-04 11:21 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 665 bytes --]
Le 31 oct. 2015 8:02 AM, "Andrei Borzenkov" <arvidjaar@gmail.com> a écrit :
>
> mkimage sets module size to aligned value; later it is used to actually
process it which /may/ lead to inconsistency (as any comparison is against
stored aligned size, not actual module size).
>
Which inconsistency do you have in mind?
> Same applies to all other embedded types actually. The only one that does
it right is pubkey.
>
> Just to make sure I do not miss something obvious; otherwise I'll make a
patch.
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
[-- Attachment #2: Type: text/html, Size: 938 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: modules size in mkimage
2015-11-04 11:21 ` Vladimir 'phcoder' Serbinenko
@ 2015-11-04 11:26 ` Andrei Borzenkov
2015-11-04 11:29 ` Vladimir 'phcoder' Serbinenko
0 siblings, 1 reply; 4+ messages in thread
From: Andrei Borzenkov @ 2015-11-04 11:26 UTC (permalink / raw)
To: grub-devel
04.11.2015 14:21, Vladimir 'phcoder' Serbinenko пишет:
> Le 31 oct. 2015 8:02 AM, "Andrei Borzenkov" <arvidjaar@gmail.com> a écrit :
>>
>> mkimage sets module size to aligned value; later it is used to actually
> process it which /may/ lead to inconsistency (as any comparison is against
> stored aligned size, not actual module size).
>>
> Which inconsistency do you have in mind?
if (size < e->e_shoff + e->e_shentsize * e->e_shnum)
{
grub_error (GRUB_ERR_BAD_OS, "ELF sections outside core");
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: modules size in mkimage
2015-11-04 11:26 ` Andrei Borzenkov
@ 2015-11-04 11:29 ` Vladimir 'phcoder' Serbinenko
0 siblings, 0 replies; 4+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2015-11-04 11:29 UTC (permalink / raw)
To: The development of GRUB 2
[-- Attachment #1: Type: text/plain, Size: 982 bytes --]
Le 4 nov. 2015 12:26 PM, "Andrei Borzenkov" <arvidjaar@gmail.com> a écrit :
>
> 04.11.2015 14:21, Vladimir 'phcoder' Serbinenko пишет:
>
>> Le 31 oct. 2015 8:02 AM, "Andrei Borzenkov" <arvidjaar@gmail.com> a
écrit :
>>>
>>>
>>> mkimage sets module size to aligned value; later it is used to actually
>>
>> process it which /may/ lead to inconsistency (as any comparison is
against
>> stored aligned size, not actual module size).
>>>
>>>
>> Which inconsistency do you have in mind?
>
>
> if (size < e->e_shoff + e->e_shentsize * e->e_shnum)
> {
> grub_error (GRUB_ERR_BAD_OS, "ELF sections outside core");
>
This is just to avoid accessing unallocated data. In this case the memory
is allocated. So it's a minor issue. I'm more concerned with some module
iterator breaking
>
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
[-- Attachment #2: Type: text/html, Size: 1509 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-04 11:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-31 7:02 modules size in mkimage Andrei Borzenkov
2015-11-04 11:21 ` Vladimir 'phcoder' Serbinenko
2015-11-04 11:26 ` Andrei Borzenkov
2015-11-04 11:29 ` Vladimir 'phcoder' Serbinenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.