linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Fleming <matt@console-pimps.org>
To: David Rientjes <rientjes@google.com>
Cc: Andrzej Zaborowski <andrew.zaborowski@intel.com>,
	Matt Fleming <matt.fleming@intel.com>,
	Madper Xie <cxie@redhat.com>, Anton Vorontsov <anton@enomsg.org>,
	Colin Cross <ccross@android.com>,
	Kees Cook <keescook@chromium.org>,
	Tony Luck <tony.luck@intel.com>,
	linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pstore: Fix an overflow on 32-bit builds.
Date: Wed, 18 Jun 2014 09:35:55 +0100	[thread overview]
Message-ID: <20140618083555.GA24049@console-pimps.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1406091322050.30620@chino.kir.corp.google.com>

On Mon, 09 Jun, at 01:24:43PM, David Rientjes wrote:
> On Mon, 9 Jun 2014, Andrzej Zaborowski wrote:
> 
> > [resend]
> > In generic_id the long int timestamp is multiplied by 100000 and needs
> > an explicit cast to u64.
> > 
> > Without that the id in the resulting pstore filename is wrong and
> > userspace may have problems parsing it, but more importantly files in
> > pstore can never be deleted and may fill the EFI flash (brick device?).
> > This happens because when generic pstore code wants to delete a file,
> > it passes the id to the EFI backend which reinterpretes it and a wrong
> > variable name is attempted to be deleted.  There's no error message but
> > after remounting pstore, deleted files would reappear.

It shouldn't be possible to brick devices because the efi-pstore code
still goes through efivar_entry_set_safe() whic has the necessary
checks. Please let me know if you've witnessed any fallout from this bug
other than being unable to delete files.

> This fixes commit fdeadb43fdf1 ("efi-pstore: Make efi-pstore return a 
> unique id") that went into stable, so I'm not sure if this should go into 
> stable as well.
 
I think it should go to stable too. Tony?

> You probably had to resend this because you didn't email any of the 
> maintainers (fixed).  Use scripts/get_maintainer.pl to figure out who to 
> email about a patch.

Thanks for triaging this David.

Unless anyone speaks up I'm going to throw this into the EFI tree with
David's Acked-by.

-- 
Matt Fleming, Intel Open Source Technology Center

      reply	other threads:[~2014-06-18  8:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 14:50 [PATCH] pstore: Fix an overflow on 32-bit builds Andrzej Zaborowski
2014-06-09 20:24 ` David Rientjes
2014-06-18  8:35   ` Matt Fleming [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=20140618083555.GA24049@console-pimps.org \
    --to=matt@console-pimps.org \
    --cc=andrew.zaborowski@intel.com \
    --cc=anton@enomsg.org \
    --cc=ccross@android.com \
    --cc=cxie@redhat.com \
    --cc=keescook@chromium.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@intel.com \
    --cc=rientjes@google.com \
    --cc=tony.luck@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).