From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] efi: check *path non-null before grub_strrchr
Date: Sat, 15 Nov 2014 20:00:32 +0300 [thread overview]
Message-ID: <20141115200032.784f9543@opensuse.site> (raw)
In-Reply-To: <20141107141958.GG22224@bivouac.eciton.net>
В Fri, 7 Nov 2014 14:19:58 +0000
Leif Lindholm <leif.lindholm@linaro.org> пишет:
> On Wed, Nov 05, 2014 at 06:19:16PM +0300, Andrei Borzenkov wrote:
> > On Wed, Nov 5, 2014 at 5:52 PM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > > On Wed, Nov 05, 2014 at 05:33:40PM +0300, Andrei Borzenkov wrote:
> > >> On Wed, Nov 5, 2014 at 3:53 PM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > >> > The EFI version of grub_machine_get_bootlocation crops the boot image
> > >> > name back to the last / in order to get a directory path. However, it
> > >> > does not check that *name is actually set before calling grub_strrchr
> > >> > to do this, and neither does grub_strrchr before dereferencing a NULL
> > >> > pointer.
> > >> >
> > >>
> > >> I wonder - do you actually have firmware that returns empty path?
> > >
> > > I did (internal development version), and that's being fixed that end
> > > too, but more graceful error handling in GRUB would still be nice.
> > >
> >
> > Sure. I wish we could display some meaningful warning here, but it is
> > too early at this stage. If get_loaded_image fails to return proper
> > image path, booting is probably screwed anyway.
>
> Indeed, but with this patch you would at least get a confused error
> message later on.
>
> > You have commit access, right?
>
> Yes - clear to push?
>
Yes. It is clear bug fix.
> /
> Leif
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
prev parent reply other threads:[~2014-11-15 17:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 12:53 [PATCH] efi: check *path non-null before grub_strrchr Leif Lindholm
2014-11-05 14:33 ` Andrei Borzenkov
2014-11-05 14:52 ` Leif Lindholm
2014-11-05 15:19 ` Andrei Borzenkov
2014-11-07 14:19 ` Leif Lindholm
2014-11-15 17:00 ` Andrei Borzenkov [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=20141115200032.784f9543@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
--cc=leif.lindholm@linaro.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.