Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp120540imu; Tue, 8 Jan 2019 15:57:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN42w4pQ33cMqCv91EprKQqybg/mqD4IUzb8DUHuFWMiC5NlxtaLnLLORw9Ju1VAfvhWbpx+ X-Received: by 2002:a62:6204:: with SMTP id w4mr3800802pfb.5.1546991871541; Tue, 08 Jan 2019 15:57:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546991871; cv=none; d=google.com; s=arc-20160816; b=oVbxvgSTIdg3kyHWVsA/roAA6vMxRTfAlx1OcruMXz05PzNa+aafsvm4a0LUIH47JW QxPtJnq+GsDO1r/gVYTnNGL32GM+xS51BYA3AMLk/cB2ly0Vqt5Qw2ep+dvcR+FqDSSW mN43EZNOdgMWt5kukB2NsXhOzk7k/E8Uc9PpS/7ALpFg+gwdrxvgObE8SE8YG9uJ4cxf MrUWYAWqBS16bO4/JqVwkVwEECqcTnjmMN+9uvOIcJFnHnaPgJx514xovgKhTNNz1rrN TvPkKbX9/oitzJxpJYkaZbKtSUYy6GrWqYJN/f2gtin4+YTbLb3k9wVX7c5qZ3kcn1iw u2RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dOceqexbP35pd7HgVWCYG5l4mAdl1rwY7zJ9A75fC2U=; b=w7nzQN5Pwrj/Z68wyUdHLqH5kUfl56asrpNsGEOIz39PmF5VgmOuhWZwWf71emd2jY rqIBdHEKp0S/o3n1QAj3P+q0N6GvFcu1hbJvNxu8FuSTEN8fQAuT/pCs457+fcQE+uyQ Cv1yD9XDzcYI736Jy2s034stEvHtS4W0NDZKOWiase4E70bugOlegPczhiI6Z7sSre/8 22JLFswfu+p2iiZPOkLhGbRKslzTUgwOSfFsKSrKIJERAh8ljEAxGQZrRjmvcmkZLLDA ti9276gMh4bTlU4NSxsQj/kS2XHHEcfxQ83Dv4W30q2ib5yXds/JxTSBMFxCMrkEDDZO svSA== 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 f5si8022815pfn.259.2019.01.08.15.57.36; Tue, 08 Jan 2019 15:57:51 -0800 (PST) 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 S1729245AbfAHXmu (ORCPT + 99 others); Tue, 8 Jan 2019 18:42:50 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:38974 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727829AbfAHXmt (ORCPT ); Tue, 8 Jan 2019 18:42:49 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 522F980868; Wed, 9 Jan 2019 00:42:42 +0100 (CET) Date: Wed, 9 Jan 2019 00:42:47 +0100 From: Pavel Machek To: Andy Lutomirski Cc: joeyli , "Lee, Chun-Yi" , "Rafael J . Wysocki" , LKML , linux-pm@vger.kernel.org, keyrings@vger.kernel.org, "Rafael J. Wysocki" , Chen Yu , Oliver Neukum , Ryan Chen , David Howells , Giovanni Gherdovich , Randy Dunlap , Jann Horn Subject: Re: [PATCH 0/5 v2][RFC] Encryption and authentication for hibernate snapshot image Message-ID: <20190108234246.GA22310@amd> References: <20190103143227.9138-1-jlee@suse.com> <20190106181026.GA15256@amd> <20190107173743.GC4210@linux-l9pv.suse> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > >> Please explain your security goals. > > > > My security goals: > > > > - Encrypt and authicate hibernate snapshot image in kernel space. Users= pace > > can only touch an encrypted and signed snapshot image. >=20 > Signed? >=20 > I=E2=80=99m not entirely convinced that the keyring mechanism is what you > want. ISTM that there are two goals here: >=20 > a) Encryption: it should be as hard as can reasonably be arranged to > extract secrets from a hibernation image. >=20 > b) Authentication part 1: it should not be possible for someone in > possession of a turned-off machine to tamper with the hibernation > image such that the image, when booted, will leak its secrets. This > should protect against attackers who don=E2=80=99t know the encryption ke= y. >=20 > c) Authentication part 2: it should be to verify, to the extent > practical, that the image came from the same machine and was really > created using hibernation. Or maybe by the same user. So... this looks like "security goals" I was asking in the first place. Thanks! Could we get something like that (with your real goals?) in the next version of the patch? > As far as I can tell, there is only one reason that any of this needs > to be in the kernel: if it=E2=80=99s all in user code, then we lose =E2= =80=9Clockdown=E2=80=9D > protection against compromised user code on a secure boot system. Is > that, in fact, true? And this is what I'd really like answer to. Because... I'd really like this to be in userspace if it does not provide additional security guarantees. Thanks, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlw1NXYACgkQMOfwapXb+vK+qACeNG5cXLr+M4bSX4Me0sXYysM8 CIwAnAoNvfPDRrv/MT3jN/y0LdEbo0lu =l/CK -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--