Skip to contentSkip to conversation

random: fix the RNDRESEEDCRNG ioctl

PATCH RESEND In review Eric Biggers 3 participants 4 messages Jan 12, 2021 – Feb 4, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 random: fix the RNDRESEEDCRNG ioctl

From: Eric Biggers <[email protected]>

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 Andy Lutomirski <[email protected]>
Cc Jann Horn <[email protected]>
Cc Theodore Ts'o <[email protected]>

---

Andrew, please consider taking this patch since the maintainer has been ignoring it for 4 months
(https://lkml.kernel.org/lkml/[email protected]/T/#u).

 drivers/char/random.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/random.c +1 -1
index 5f3b8ac9d97b0..a894c0559a8cf 100644
@@ -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:
Signature · 1 line
2.30.0
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Eric Biggers

From: Eric Biggers <[email protected]>

The RNDRESEEDCRNG ioctl reseeds the primary_crng from itself, which doesn't make sense. Reseed it from the input_pool instead.

Quoted 8 lines
Fixes d848e5f8e1eb ("random: add new ioctl RNDRESEEDCRNG")
Cc Andy Lutomirski <[email protected]>
Cc Jann Horn <[email protected]>
Cc Theodore Ts'o <[email protected]>
Quoted 26 lines

---

Andrew, please consider taking this patch since the maintainer has been ignoring it for 4 months
(https://lkml.kernel.org/lkml/[email protected]/T/#u).

 drivers/char/random.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/random.c +1 -2
index 5f3b8ac9d97b0..a894c0559a8cf 100644
@@ -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

#2 lore raw
In reply to Eric Biggers
Quoted 13 lines · Eric Biggers

From: Eric Biggers <[email protected]>

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 Andy Lutomirski <[email protected]>
Cc Jann Horn <[email protected]>
Cc Theodore Ts'o <[email protected]>
Quoted 5 lines

---

Andrew, please consider taking this patch since the maintainer has been ignoring it for 4 months
(https://lkml.kernel.org/lkml/[email protected]/T/#u).

Ping.

maintainer
#3 lore raw
Quoted 16 lines · Eric Biggers
Quoted 15 lines · Eric Biggers

From: Eric Biggers <[email protected]>

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 Andy Lutomirski <[email protected]>
Cc Jann Horn <[email protected]>
Cc Theodore Ts'o <[email protected]>

---

Quoted 5 lines
Quoted 3 lines

Andrew, please consider taking this patch since the maintainer has been ignoring it for 4 months
(https://lkml.kernel.org/lkml/[email protected]/T/#u).

Ping.

Given the lack of response, I'll take this now...

thanks,
greg k-h