Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH 4.14] efi: random: Properly limit the size of the random seed
Date: Sat, 3 Dec 2022 14:54:12 +0100	[thread overview]
Message-ID: <Y4tVBCLUz6N36rtT@kroah.com> (raw)
In-Reply-To: <eadb1fd5a181975bcf63b742b02207a2f347dd57.camel@decadent.org.uk>

On Thu, Dec 01, 2022 at 12:53:03AM +0100, Ben Hutchings wrote:
> On Thu, 2022-12-01 at 00:47 +0100, Ben Hutchings wrote:
> > Commit be36f9e7517e ("efi: READ_ONCE rng seed size before munmap")
> > added a READ_ONCE() and also changed the call to
> > add_bootloader_randomness() to use the local size variable.  Neither
> > of these changes was actually needed and this was not backported to
> > the 4.14 stable branch.
> > 
> > Commit 161a438d730d ("efi: random: reduce seed size to 32 bytes")
> > reverted the addition of READ_ONCE() and added a limit to the value of
> > size.  This depends on the earlier commit, because size can now differ
> > from seed->size, but it was wrongly backported to the 4.14 stable
> > branch by itself.
> > 
> > Apply the missing change to the add_bootloader_randomness() parameter
> > (except that here we are still using add_device_randomness()).
> [...]
> 
> This made me wonder: shouldn't commit 18b915ac6b0a ("efi/random: Treat
> EFI_RNG_PROTOCOL output as bootloader randomness") be applied to these
> older stable branches?  Without that, the EFI RNG can't be distrusted
> if necessary.

Makes sense, want to send a backport on top of this one as the original
will not work?

greg k-h

  reply	other threads:[~2022-12-03 13:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30 23:47 [PATCH 4.14] efi: random: Properly limit the size of the random seed Ben Hutchings
2022-11-30 23:53 ` Ben Hutchings
2022-12-03 13:54   ` Greg KH [this message]
2022-12-03 13:54 ` Greg KH

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=Y4tVBCLUz6N36rtT@kroah.com \
    --to=greg@kroah.com \
    --cc=Jason@zx2c4.com \
    --cc=ardb@kernel.org \
    --cc=ben@decadent.org.uk \
    --cc=ilias.apalodimas@linaro.org \
    --cc=linux@dominikbrodowski.net \
    --cc=stable@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