[opensuse-factory] Re: UEFI Secure Boot and hibernation

On Tue, Feb 18, 2020 at 11:59 PM joeyli <jlee@suse.com> wrote:
On Tue, Feb 18, 2020 at 11:16:25PM -0700, Chris Murphy wrote:
Do you think it's necessary to encrypt and sign swap (page outs)? If an attacker could inject something malicious into the hibernation image, why not inject it into pages in swap? For example: Hibernation (apparently) can silently fail if > 50% of RAM is used; but the intention is that some mechanism (whether kernel or user-space) needs to free up enough RAM so that the hibernation image can be created. https://marc.info/?l=linux-kernel&m=157177497015315 In my experience, upon issuing: # echo reboot > /sys/power/disk # echo disk > /sys/power/state I see considerable page outs to the swap partition, prior to hibernation entry. Upon resume, those pages in swap are still valid. Is there a reason why they wouldn't be exploitable? Maybe it's a more suitable subject for discussion on linux-pm@ list? -- Chris Murphy -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Am Mittwoch, den 19.02.2020, 14:04 -0700 schrieb Chris Murphy:
The kernel swaps only anonymous user space pages. The mission of Secure Boot is to protect kernel space even from root. Hence only pages of kernel space need to be protected. The only time they are read from disk is during resumption from STD. The problem you identified exists and if you want to fix it you indeed need to encrypt swap, but it is independent (albeit similar) to STD. Regards Oliver -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org

Am Mittwoch, den 19.02.2020, 14:04 -0700 schrieb Chris Murphy:
The kernel swaps only anonymous user space pages. The mission of Secure Boot is to protect kernel space even from root. Hence only pages of kernel space need to be protected. The only time they are read from disk is during resumption from STD. The problem you identified exists and if you want to fix it you indeed need to encrypt swap, but it is independent (albeit similar) to STD. Regards Oliver -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (2)
-
Chris Murphy
-
Oliver Neukum