Received: by 10.223.164.221 with SMTP id h29csp2658066wrb; Thu, 2 Nov 2017 15:02:20 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Q0TiLAPDv2n1E7TmDs6OcILpP11Kbw/SJoR5w97opzycuA+o/xD1tbjGHsQF1Rk43/tTM5 X-Received: by 10.159.230.13 with SMTP id u13mr4655638plq.226.1509660140627; Thu, 02 Nov 2017 15:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509660140; cv=none; d=google.com; s=arc-20160816; b=l297oPhYTm+p5AZll3xmkxryNRKLljBdJxNDH6hSb3Ffad3LiorDNPtczOi9iUHs4g dZ4oZGoz4XMkiMSiYZP7SGEokBA3X8Gbzbri151G55bjCXiEoEIFrMhrXR/vJBDqK6Vv 0aMt/eWMI2orocZfaAoi8P4in/V4hBKYNmvgLxo38ZtUPlSugVp1DSWyJOHcvGNTmz1t Fw6rSFrcK2WQjfxrAELT2CQATRuksKVcWsGvvMH/1C6KI8wapNEtnBU2ZpXUgDMCMOf9 m7/z12w3YnnRl+qGXs/jKozrGpKXawfIScrCRdsZXt+AYtC7TxvxkrIB9tJ5tFM6ZIaP jSaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-transfer-encoding :mime-version:subject:cc:to:references:in-reply-to:from:organization :dmarc-filter:arc-authentication-results; bh=1otSQ0dD6KeIZL22wCt/nlbmJX+M91mE8LDBHMZiJPc=; b=Yf0HmzPBNoJsLgzRLnwdj0vWb4QZRyMrhVnvp8YPi3V1lq7C/OB8RbUcEBf5/oe5L3 JSwj2iAgyVTDBsSQJYihhLN7OiAkFnpwUyQEMLdKlLSJVqWUgK2q9Ljsd6GEmpe/tPM8 9nEO95Sguy8Ng+lB2XS3/h3PxLC8GWZM2npYR0vUp1JNhYUnuhkrt7OfXhY5KF9Rpb2M lnmKaoDbvovFFgw4neVfcIDC5baqhqCiBEyood3zTm+oc8mTRTIMbRZ6a/GxsnpzjJII bbk73clusoJSdnSEqJdG8xmAvSQO3I9bQeQHyAqSspYTMnGCyeu4DOuoZrifNAUUkGKQ ozQQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v38si3289858plg.357.2017.11.02.15.01.56; Thu, 02 Nov 2017 15:02:20 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934470AbdKBWBM convert rfc822-to-8bit (ORCPT + 99 others); Thu, 2 Nov 2017 18:01:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12738 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbdKBWBK (ORCPT ); Thu, 2 Nov 2017 18:01:10 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 26E41883CD; Thu, 2 Nov 2017 22:01:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 26E41883CD Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dhowells@redhat.com Received: from warthog.procyon.org.uk (ovpn-121-14.rdu2.redhat.com [10.10.121.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90A8860618; Thu, 2 Nov 2017 22:01:08 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <1509658881.3416.10.camel@linux.vnet.ibm.com> References: <1509658881.3416.10.camel@linux.vnet.ibm.com> <1509650031.3507.20.camel@linux.vnet.ibm.com> <1509130095.3716.13.camel@linux.vnet.ibm.com> <150842463163.7923.11081723749106843698.stgit@warthog.procyon.org.uk> <150842465546.7923.6762214527898273559.stgit@warthog.procyon.org.uk> <20240.1509643356@warthog.procyon.org.uk> <12321.1509658211@warthog.procyon.org.uk> To: Mimi Zohar Cc: dhowells@redhat.com, linux-security-module@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk, linux-efi@vger.kernel.org, matthew.garrett@nebula.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, jforbes@redhat.com Subject: Re: [PATCH 03/27] Enforce module signatures if the kernel is locked down MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Date: Thu, 02 Nov 2017 22:01:07 +0000 Message-ID: <14108.1509660067@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 02 Nov 2017 22:01:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mimi Zohar wrote: > Right, it would never get here if the IMA signature verification > fails.  If sig_enforce is not enabled, then it will also work.  So the > only case is if sig_enforced is enabled and there is no key. > > eg. >          else if (can_do_ima_check && is_ima_appraise_enabled()) >                 err = 0; I'm not sure where you want to put that, but I can't just do this: /* Not having a signature is only an error if we're strict. */ if (err == -ENOKEY && !sig_enforce && (!can_do_ima_check || !is_ima_appraise_enabled()) && !kernel_is_locked_down("Loading of unsigned modules")) err = 0; else if (can_do_ima_check && is_ima_appraise_enabled()) err = 0; because that'll print out a message in lockdown mode saying that you're not allowed to do that and then maybe do it anyway. David From 1582992220635451773@xxx Thu Nov 02 21:43:43 +0000 2017 X-GM-THRID: 1581705993536835286 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread