* [PATCH RESEND] random: fix the RNDRESEEDCRNG ioctl
@ 2021-01-12 19:28 Eric Biggers
2021-01-13 11:51 ` Ard Biesheuvel
2021-02-01 22:43 ` Eric Biggers
0 siblings, 2 replies; 4+ messages in thread
From: Eric Biggers @ 2021-01-12 19:28 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, stable, linux-crypto, Andy Lutomirski, Jann Horn,
Theodore Ts'o
From: Eric Biggers <ebiggers@google.com>
The RNDRESEEDCRNG ioctl reseeds the primary_crng from itself, which
doesn't make sense. Reseed it from the input_pool instead.
Fixes: d848e5f8e1eb ("random: add new ioctl RNDRESEEDCRNG")
Cc: stable@vger.kernel.org
Cc: linux-crypto@vger.kernel.org
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Jann Horn <jannh@google.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jann Horn <jannh@google.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
Andrew, please consider taking this patch since the maintainer has been
ignoring it for 4 months
(https://lkml.kernel.org/lkml/20200916041908.66649-1-ebiggers@kernel.org/T/#u).
drivers/char/random.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 5f3b8ac9d97b0..a894c0559a8cf 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1972,7 +1972,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
return -EPERM;
if (crng_init < 2)
return -ENODATA;
- crng_reseed(&primary_crng, NULL);
+ crng_reseed(&primary_crng, &input_pool);
crng_global_init_time = jiffies - 1;
return 0;
default:
--
2.30.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] random: fix the RNDRESEEDCRNG ioctl
2021-01-12 19:28 [PATCH RESEND] random: fix the RNDRESEEDCRNG ioctl Eric Biggers
@ 2021-01-13 11:51 ` Ard Biesheuvel
2021-02-01 22:43 ` Eric Biggers
1 sibling, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2021-01-13 11:51 UTC (permalink / raw)
To: Eric Biggers
Cc: Andrew Morton, Linux Kernel Mailing List, # 3.4.x,
Linux Crypto Mailing List, Andy Lutomirski, Jann Horn,
Theodore Ts'o
On Tue, 12 Jan 2021 at 20:30, Eric Biggers <ebiggers@kernel.org> wrote:
>
> From: Eric Biggers <ebiggers@google.com>
>
> The RNDRESEEDCRNG ioctl reseeds the primary_crng from itself, which
> doesn't make sense. Reseed it from the input_pool instead.
>
> Fixes: d848e5f8e1eb ("random: add new ioctl RNDRESEEDCRNG")
> Cc: stable@vger.kernel.org
> Cc: linux-crypto@vger.kernel.org
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Jann Horn <jannh@google.com>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Reviewed-by: Jann Horn <jannh@google.com>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
> ---
>
> Andrew, please consider taking this patch since the maintainer has been
> ignoring it for 4 months
> (https://lkml.kernel.org/lkml/20200916041908.66649-1-ebiggers@kernel.org/T/#u).
>
>
> drivers/char/random.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/random.c b/drivers/char/random.c
> index 5f3b8ac9d97b0..a894c0559a8cf 100644
> --- a/drivers/char/random.c
> +++ b/drivers/char/random.c
> @@ -1972,7 +1972,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
> return -EPERM;
> if (crng_init < 2)
> return -ENODATA;
> - crng_reseed(&primary_crng, NULL);
> + crng_reseed(&primary_crng, &input_pool);
> crng_global_init_time = jiffies - 1;
> return 0;
> default:
> --
> 2.30.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] random: fix the RNDRESEEDCRNG ioctl
2021-01-12 19:28 [PATCH RESEND] random: fix the RNDRESEEDCRNG ioctl Eric Biggers
2021-01-13 11:51 ` Ard Biesheuvel
@ 2021-02-01 22:43 ` Eric Biggers
2021-02-04 15:59 ` Greg KH
1 sibling, 1 reply; 4+ messages in thread
From: Eric Biggers @ 2021-02-01 22:43 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel, stable, linux-crypto, Andy Lutomirski, Jann Horn,
Theodore Ts'o
On Tue, Jan 12, 2021 at 11:28:18AM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> The RNDRESEEDCRNG ioctl reseeds the primary_crng from itself, which
> doesn't make sense. Reseed it from the input_pool instead.
>
> Fixes: d848e5f8e1eb ("random: add new ioctl RNDRESEEDCRNG")
> Cc: stable@vger.kernel.org
> Cc: linux-crypto@vger.kernel.org
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Jann Horn <jannh@google.com>
> Cc: Theodore Ts'o <tytso@mit.edu>
> Reviewed-by: Jann Horn <jannh@google.com>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
>
> Andrew, please consider taking this patch since the maintainer has been
> ignoring it for 4 months
> (https://lkml.kernel.org/lkml/20200916041908.66649-1-ebiggers@kernel.org/T/#u).
Ping.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH RESEND] random: fix the RNDRESEEDCRNG ioctl
2021-02-01 22:43 ` Eric Biggers
@ 2021-02-04 15:59 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-02-04 15:59 UTC (permalink / raw)
To: Eric Biggers
Cc: Andrew Morton, linux-kernel, stable, linux-crypto,
Andy Lutomirski, Jann Horn, Theodore Ts'o
On Mon, Feb 01, 2021 at 02:43:51PM -0800, Eric Biggers wrote:
> On Tue, Jan 12, 2021 at 11:28:18AM -0800, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > The RNDRESEEDCRNG ioctl reseeds the primary_crng from itself, which
> > doesn't make sense. Reseed it from the input_pool instead.
> >
> > Fixes: d848e5f8e1eb ("random: add new ioctl RNDRESEEDCRNG")
> > Cc: stable@vger.kernel.org
> > Cc: linux-crypto@vger.kernel.org
> > Cc: Andy Lutomirski <luto@kernel.org>
> > Cc: Jann Horn <jannh@google.com>
> > Cc: Theodore Ts'o <tytso@mit.edu>
> > Reviewed-by: Jann Horn <jannh@google.com>
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
> > ---
> >
> > Andrew, please consider taking this patch since the maintainer has been
> > ignoring it for 4 months
> > (https://lkml.kernel.org/lkml/20200916041908.66649-1-ebiggers@kernel.org/T/#u).
>
> Ping.
Given the lack of response, I'll take this now...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-02-04 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 19:28 [PATCH RESEND] random: fix the RNDRESEEDCRNG ioctl Eric Biggers
2021-01-13 11:51 ` Ard Biesheuvel
2021-02-01 22:43 ` Eric Biggers
2021-02-04 15:59 ` Greg KH
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).