public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot, v4, 2/7] efi_loader: Fix memory map size check to avoid out-of-bounds access
Date: Thu, 13 Oct 2016 16:34:31 +0200	[thread overview]
Message-ID: <20161013143430.34775.99400@achrid.arch.suse.de> (raw)
In-Reply-To: <fa6cd700d1b14698a33d8aa159637503@rwthex-w2-b.rwth-ad.de>

> 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>

Thanks, applied to 

      parent reply	other threads:[~2016-10-13 14:34 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
2016-10-13 14:34   ` Alexander Graf [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=20161013143430.34775.99400@achrid.arch.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox