[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Initialized initrd_ctx so we don't free a random pointer fro
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH] Initialized initrd_ctx so we don't free a random pointer from the stack. |
Date: |
Sun, 21 Sep 2014 17:30:44 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0 |
On 21.09.2014 08:39, Andrei Borzenkov wrote:
> В Wed, 17 Sep 2014 16:30:11 -0400
> Peter Jones <address@hidden> пишет:
>
>> Currently, if "linux" fails, the "goto fail;" in grub_cmd_initrd sends us
>> into grub_initrd_close() without grub_initrd_init() being called, and thus
>> it never clears initrd_ctx->components. grub_initrd_close() then frees that
>> address, which is stale data from the stack. If the stack happens to have a
>> stale *address* there that matches a recent allocation, then you'll get a
>> double free later.
>>
>> So initialize the memory up front.
>>
>
> Pushed.
>
Thank you for taking care of this.
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
signature.asc
Description: OpenPGP digital signature