From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
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 [thread overview]
Message-ID: <541EEF24.7000606@gmail.com> (raw)
In-Reply-To: <20140921103940.6d9858e4@opensuse.site>
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
On 21.09.2014 08:39, Andrei Borzenkov wrote:
> В Wed, 17 Sep 2014 16:30:11 -0400
> Peter Jones <pjones@redhat.com> пишет:
>
>> 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
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 213 bytes --]
prev parent reply other threads:[~2014-09-21 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 20:30 [PATCH] Initialized initrd_ctx so we don't free a random pointer from the stack Peter Jones
2014-09-21 6:39 ` Andrei Borzenkov
2014-09-21 15:30 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=541EEF24.7000606@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).