]> git.baikalelectronics.ru Git - kernel.git/commit
random: clamp credited irq bits to maximum mixed
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 23 Sep 2022 00:42:51 +0000 (02:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Oct 2022 05:54:39 +0000 (07:54 +0200)
commite5e4876ee6a4714e7ddebc889002a7a239c52299
tree41c917a8fef695ea8728874f8e0aae822e254b75
parent7d97c51eb7ac3072e1b81f193f39793cd3fdcdd6
random: clamp credited irq bits to maximum mixed

commit 2e69ab083e47dd7150db7f0f442751d303093430 upstream.

Since the most that's mixed into the pool is sizeof(long)*2, don't
credit more than that many bytes of entropy.

Fixes: 4f280103bfeb ("random: do not use input pool from hard IRQs")
Cc: stable@vger.kernel.org
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c