public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Julius Werner <jwerner@chromium.org>
Cc: linux-kernel@vger.kernel.org, Aaron Durbin <adurbin@chromium.org>
Subject: Re: [PATCH] firmware: google: memconsole: Prevent overrun attack on coreboot console
Date: Sat, 20 May 2017 10:32:23 +0200	[thread overview]
Message-ID: <20170520083223.GB3460@kroah.com> (raw)
In-Reply-To: <20170519214438.18398-1-jwerner@chromium.org>

On Fri, May 19, 2017 at 02:44:38PM -0700, Julius Werner wrote:
> The recent coreboot memory console update (firmware: google: memconsole:
> Adapt to new coreboot ring buffer format) introduced a small security
> issue in the driver: The new driver implementation parses the memory
> console structure again on every access. This is intentional so that
> additional lines added concurrently by runtime firmware can be read out.
> 
> However, if an attacker can write to the structure, they could increase
> the size value to a point where the driver would read potentially
> sensitive memory areas from outside the original console buffer during
> the next access. This can be done through /dev/mem, since the console
> buffer usually resides in firmware-reserved memory that is not covered
> by STRICT_DEVMEM.
> 
> This patch resolves that problem by reading the buffer's size value only
> once during boot (where we can still trust the structure). Other parts
> of the structure can still be modified at runtime, but the driver's
> bounds checks make sure that it will never read outside the buffer.
> 
> Signed-off-by: Julius Werner <jwerner@chromium.org>

Care to provide a "Fixes: SHA" type line here saying what commit this
fixes the issue for, to allow people to know what is going on.

thanks,

greg k-h

  reply	other threads:[~2017-05-20  8:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-19 21:44 [PATCH] firmware: google: memconsole: Prevent overrun attack on coreboot console Julius Werner
2017-05-20  8:32 ` Greg Kroah-Hartman [this message]
2017-05-23  1:36   ` Julius Werner
2017-05-23  6:39     ` Greg Kroah-Hartman
2017-05-23 23:48       ` Julius Werner

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=20170520083223.GB3460@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=adurbin@chromium.org \
    --cc=jwerner@chromium.org \
    --cc=linux-kernel@vger.kernel.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