From: Andrei Borzenkov <arvidjaar@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 10:39:40 +0400 [thread overview]
Message-ID: <20140921103940.6d9858e4@opensuse.site> (raw)
In-Reply-To: <1410985811-17520-1-git-send-email-pjones@redhat.com>
В 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.
next prev parent reply other threads:[~2014-09-21 6:40 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 [this message]
2014-09-21 15:30 ` Vladimir 'φ-coder/phcoder' Serbinenko
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=20140921103940.6d9858e4@opensuse.site \
--to=arvidjaar@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 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.