From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 2/7] efi_loader: Fix memory map size check to avoid out-of-bounds access
Date: Mon, 10 Oct 2016 13:32:11 +0200 [thread overview]
Message-ID: <57FB7C3B.6090801@suse.de> (raw)
In-Reply-To: <fa6cd700d1b14698a33d8aa159637503@rwthex-w2-b.rwth-ad.de>
On 10/09/2016 10:17 PM, Stefan Br?ns wrote:
> The current efi_get_memory_map() function overwrites the map_size
> property before reading its value. That way the sanity check whether our
> memory map fits into the given array always succeeds, potentially
> overwriting arbitrary payload memory.
>
> This patch moves the property update write after its sanity check, so
> that the check actually verifies the correct value.
>
> So far this has not triggered any known bugs, but we're better off safe
> than sorry.
>
> If the buffer is to small, the returned memory_map_size indicates the
> required size to the caller.
>
> Signed-off-by: Stefan Br?ns <stefan.bruens@rwth-aachen.de>
Reviewed-by: Alexander Graf <agraf@suse.de>
Alex
next prev parent reply other threads:[~2016-10-10 11:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20161001213229.19522-3-stefan.bruens@rwth-aachen.de>
2016-10-09 20:17 ` [U-Boot] [PATCH v4 2/7] efi_loader: Fix memory map size check to avoid out-of-bounds access Stefan Brüns
2016-10-10 11:32 ` Alexander Graf [this message]
2016-10-13 14:34 ` [U-Boot] [U-Boot, v4, " Alexander Graf
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=57FB7C3B.6090801@suse.de \
--to=agraf@suse.de \
--cc=u-boot@lists.denx.de \
/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.