powerpc/rtas: block error injection when locked down
authorNathan Lynch <nathanl@linux.ibm.com>
Mon, 26 Sep 2022 13:16:43 +0000 (08:16 -0500)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Sep 2022 09:22:14 +0000 (19:22 +1000)
commitb8f3e48834fe8c86b4f21739c6effd160e2c2c19
tree6658e486f3a3a23d2a418f48986029a54977326f
parent99df7a2810b6d24651d4887ab61a142e042fb235
powerpc/rtas: block error injection when locked down

The error injection facility on pseries VMs allows corruption of
arbitrary guest memory, potentially enabling a sufficiently privileged
user to disable lockdown or perform other modifications of the running
kernel via the rtas syscall.

Block the PAPR error injection facility from being opened or called
when locked down.

Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
Acked-by: Paul Moore <paul@paul-moore.com> (LSM)
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220926131643.146502-3-nathanl@linux.ibm.com
arch/powerpc/kernel/rtas.c
include/linux/security.h
security/security.c