Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95966C433DF for ; Fri, 29 May 2020 09:02:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6CDD120776 for ; Fri, 29 May 2020 09:02:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6CDD120776 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeau5-0007rj-Uk; Fri, 29 May 2020 09:02:13 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jeau4-0007re-8g for xen-devel@lists.xenproject.org; Fri, 29 May 2020 09:02:12 +0000 X-Inumbo-ID: 14daf304-a18b-11ea-a881-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 14daf304-a18b-11ea-a881-12813bfff9fa; Fri, 29 May 2020 09:02:11 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0A755AB3D; Fri, 29 May 2020 09:02:09 +0000 (UTC) Subject: Re: Xen XSM/FLASK policy, grub defaults, etc. To: George Dunlap , Ian Jackson References: <24270.35349.838484.116865@mariner.uk.xensource.com> <0D83AAA6-A205-4256-8A38-CC8122AC063D@citrix.com> From: Jan Beulich Message-ID: <09d87f3d-e166-1e7c-ec8d-dd3e54f366fb@suse.com> Date: Fri, 29 May 2020 11:02:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <0D83AAA6-A205-4256-8A38-CC8122AC063D@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , "cjwatson@debian.org" , Wei Liu , Andrew Cooper , "xen-devel@lists.xenproject.org" , Daniel De Graaf Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 27.05.2020 18:08, George Dunlap wrote: >> On May 27, 2020, at 4:41 PM, Ian Jackson wrote: >> >> The Xen tools build system builds a FLASK policy by default. It does >> this even if the hypervisor build for XSM is disabled. >> >> I recently sent patches upstream to grub to support XSM in >> update-grub. update-grub is the program which examines your /boot and >> generates appropriate bootloader entries. My merge request >> https://salsa.debian.org/grub-team/grub/-/merge_requests/18 >> finds XSM policy files, and when theya are found, generates "XSM >> enabled" bootloader entries. [1] >> >> The result of these two things together is that a default build of >> grub will result in these "XSM enabled" bootloader entries. In >> practice I think these entries will boot because everything ignores >> the additional XSM policy file (!) and Xen ignores the >> "flask=enforcing" option (!!) >> >> This is not particularly good. Offering people an "XSM enabled" >> option which does nothing is poor because it might think they have the >> extra security but actually significantly more steps are needed. But >> there doesn't appear to be any way for update-grub to tell whether a >> particular hypervisor does support XSM or not. >> >> I think the following changes would be good: >> >> 1. Xen should reject "flask=enforcing" if it is built without FLASK >> support, rather than ignoring it. This will ensure users are not >> misled by these boot options since they will be broken. > > +1 Yeah, probably better indeed, despite the current behavior being documented correctly. I'll make a patch. Jan