Received: by 10.192.165.148 with SMTP id m20csp1702280imm; Thu, 26 Apr 2018 00:36:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/sxrd8S67tivOlSJqnyHrPhY5wbyOGF5GvgWWFEnHvheJfwCxJSpoW0K+LI7cS4+hao6uu X-Received: by 2002:a17:902:5a5:: with SMTP id f34-v6mr32079189plf.288.1524728201968; Thu, 26 Apr 2018 00:36:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524728201; cv=none; d=google.com; s=arc-20160816; b=JX7yeuJIj4iOc9Tu9LHsYjpjnPLItlD61UjQ+k+rua4XamAQSbBfJc4pA1hzt+cM4r Js5IWUBGV9QcAbc38lLXeCU7NZJWu6SLwu28ivdqCbgyFGCXiV7pinUWRzCgV2Gtqyig R9aRItKpz7Xp89rfovpWtxE0qeon1dVDhB1oXWLBgfW7yqwxdlGXSvRimBGgwo6M68ct Z4RAVcpoXJTBPn792LvkCasVw7MDwFmgblKv7Tle1x/pu8vHKIgQRyYCRXlasghCBTIO fvapoboiVVyBRTv9iTKitzuV2/g6m6GOrARhrENBxKLBER8MjHzyQMjc/2wGncVXchJy 3chA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KwUPhINiv2//RCpUZvutjgxUlzrUmZj40GrH07oirKk=; b=IlZLgetEqvnYYuRLqrAdajzgXwv91+oVcQgLwcmKAXgabT4ycS/fy9plbP5n9aQrjT EWTe9PuyQprv1rPPXRqyaPpZJiesJQ7t8E5Yk5EvpE5+1S9q73wQrFciP9uIeMQa6Wb0 CMFhjZhZPaL07zwoZTHDvMNjmT69SgTynazJtjhgAh1aWKZeJhvo6pn+9oBbixUjajZX NgqTnCJ57/NzNWetVdHdIgS2eDVdcytA0dgjN7FZRPqcy9GLcUrENa6z7FA86fiWfUSZ YN1ZE/5DUB8BYswg1Gzh3L3ccJMDEtmkj2thXA/crnkLYirOA6nIxEptbJvj5fHETv1K ejVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si6414275plh.224.2018.04.26.00.36.27; Thu, 26 Apr 2018 00:36:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754265AbeDZHeo (ORCPT + 99 others); Thu, 26 Apr 2018 03:34:44 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:60301 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754239AbeDZHek (ORCPT ); Thu, 26 Apr 2018 03:34:40 -0400 Received: from 79.184.255.18.ipv4.supernova.orange.pl (79.184.255.18) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 17af7f7d0a7c12a4; Thu, 26 Apr 2018 09:34:38 +0200 From: "Rafael J. Wysocki" To: Pavel Machek Cc: David Howells , jikos@suse.cz, torvalds@linux-foundation.org, linux-man@vger.kernel.org, linux-api@vger.kernel.org, jmorris@namei.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH 07/24] hibernate: Disable when the kernel is locked down Date: Thu, 26 Apr 2018 09:34:28 +0200 Message-ID: <4403604.jesDZjvsch@aspire.rjw.lan> In-Reply-To: <20180426072646.GA31822@amd> References: <20180413202234.GA4484@amd> <27926.1524148733@warthog.procyon.org.uk> <20180426072646.GA31822@amd> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, April 26, 2018 9:26:46 AM CEST Pavel Machek wrote: > On Thu 2018-04-19 15:38:53, David Howells wrote: > > Pavel Machek wrote: > > > > > > There is currently no way to verify the resume image when returning > > > > from hibernate. This might compromise the signed modules trust model, > > > > so until we can work with signed hibernate images we disable it when the > > > > kernel is locked down. > > > > > > I'd rather see hibernation fixed than disabled like this. > > > > The problem is that you have to store the hibernated kernel image encrypted, > > but you can't store the decryption key on disk unencrypted or you've just > > wasted the effort. > > That's not how the crypto needs to work. Talk to Jiri Kosina, ok? > > Firmware gives you a key, you keep it secret, use it to sign the > hibernation image on suspend, and verify the signature on resume. Or > something like that. A simplified approach might be to encrypt the image during hibernation using a user-provided passphrase and then ask for that passphrase during resume to decrypt the image. The attacker would then need to know the passphrase to substitute their own image for the original one successfully.