]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 14 Nov 2022 10:25:47 +0000 (11:25 +0100)
commit2278e94d0985d12b53331ffa9da0ec7e2240046a
tree08cc43b337d1a7d093479dec5e828765b67c235b
parent5d37caffdf73959d2cc282a1ad1dac30ccbdf89d
random: clamp credited irq bits to maximum mixed

BugLink: https://bugs.launchpad.net/bugs/1995638
commit e78a802a7b4febf53f2a92842f494b01062d85a8 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: e3e33fc2ea7f ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/char/random.c