Dave Young 1f94d5e9a3 lockdown: Copy secure_boot flag in boot params across kexec reboot
mainline inclusion
from mainline-v5.4-rc1
commit fef5dad9876034253d59acbf8c0c314f4d94cf87
category: bugfix
bugzilla: NA
CVE: CVE-2015-7837

-------------------------------------------------

Kexec reboot in case secure boot being enabled does not keep the secure
boot mode in new kernel, so later one can load unsigned kernel via legacy
kexec_load.  In this state, the system is missing the protections provided
by secure boot.

Adding a patch to fix this by retain the secure_boot flag in original
kernel.

secure_boot flag in boot_params is set in EFI stub, but kexec bypasses the
stub.  Fixing this issue by copying secure_boot flag across kexec reboot.

Signed-off-by: Dave Young <dyoung@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Matthew Garrett <mjg59@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
cc: kexec@lists.infradead.org
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Yu Changchun <yuchangchun1@huawei.com>
2021-02-05 11:36:42 +08:00
..
2020-04-23 10:30:20 +02:00
2020-10-01 13:14:25 +02:00
2020-06-22 09:05:25 +02:00
2018-07-20 12:29:24 +10:00
2017-12-12 11:32:24 +01:00
2018-08-24 13:10:38 -07:00
2019-05-31 06:46:27 -07:00
2020-06-22 09:05:01 +02:00
2019-05-14 19:17:53 +02:00
2019-05-14 19:17:53 +02:00