]> git.itanic.dy.fi Git - linux-stable/commit
m68k: Process bootinfo records before saving them
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 27 Sep 2022 13:08:34 +0000 (15:08 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 28 Sep 2022 20:16:44 +0000 (22:16 +0200)
commit7c236d93c6764dcaca7ab66d76768a044647876d
treec8b9aad19088e7e39fe84e923966454aa01bf302
parent15f9042311b0ab9c2904d50428f304a6229d6a02
m68k: Process bootinfo records before saving them

The RNG seed boot record is memzeroed after processing, in order to
preserve forward secrecy. By saving the bootinfo for procfs prior to
that, forward secrecy is violated, since it becomes possible to recover
past states. So, save the bootinfo block only after first processing
them.

Fixes: a1ee38ab1a75 ("m68k: virt: Use RNG seed from bootinfo block")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Link: https://lore.kernel.org/r/20220927130835.1629806-1-Jason@zx2c4.com
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/kernel/setup_mm.c