Received: by 10.223.164.221 with SMTP id h29csp2644347wrb; Thu, 2 Nov 2017 14:43:44 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RqzPIBn9/ZWkFjSvJ8hnzr23P6qat4DsAJzZJvONcJUZ4cKWahJVwyZPMFJnnIldqLZ9ff X-Received: by 10.159.216.130 with SMTP id s2mr4589107plp.347.1509659024077; Thu, 02 Nov 2017 14:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509659024; cv=none; d=google.com; s=arc-20160816; b=Glveu6Op+nLtzJ66KrFCSq+e5uPViGKjkLOmuufCHuJAQ0au+HYZWASNcIiYMTrQMR B4em4XbXdYuX5V2IqCLwZEp/x6t9396cNALE8SZgw0CApS5hTFAk96myjJENA/bQtyqL 66iSrDAYydEKfRp7X2CDJERb56hsOaoIiM1Jb2vsAP6qb2eu5UQd9vEGcSOG5ogIoYo8 WNus+62Gq47fxUrE+f44BbWSqLi/6SVdWBWznghF2k3KM4vVQ4NNxik3q04ESxOiXDoL 7va+L7CJRAsbf51gSPHr8vYURUumvGiB7fUVvjU7pXE2XOhuLWaddp414kN1XkFfYtsl BEPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject :arc-authentication-results; bh=xrHKVTu3jBf2gnxEzeoBTDEb7GHhXKRkiFTOLOVVaDU=; b=GhsAtxCw/ECnngb1UQ8iIhE8UfIwG1wf/xsHidJL6+6m3eevo05KM/jEFuUTb1WSMA lG7tuRa4JGh2fn58XdaVIwkJw4GoXA+rWKMaybE+e3Ta9fh4Bo/vU0Q9YZP4FG8jp2AE zwTNThDOlFFBlr31T5ZP2n9fyk+S5b2YskeRhL/C85UFYgIaEoKkjxHiHChnBDoucPdi hysg83ZzhTYmmMWknZPlAwJLDFkJR5kOvYVSOL6APTcyQ8gCLO7lHhbB8LCU7yipuea6 KOUGcvSJZvXd1BoyS+r7xm/8pERevCRTz9i4y+fM69m4OQNO3xgLLow5AiauAuQIEaIn c5JA== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l197si4735022pga.371.2017.11.02.14.43.30; Thu, 02 Nov 2017 14:43:44 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964995AbdKBVlc (ORCPT + 99 others); Thu, 2 Nov 2017 17:41:32 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58696 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964829AbdKBVl3 (ORCPT ); Thu, 2 Nov 2017 17:41:29 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA2LdRiW111349 for ; Thu, 2 Nov 2017 17:41:29 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0b-001b2d01.pphosted.com with ESMTP id 2e07wvja4r-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 02 Nov 2017 17:41:29 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 Nov 2017 21:41:27 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 2 Nov 2017 21:41:24 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA2LfNQk35586302; Thu, 2 Nov 2017 21:41:23 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5EB1D52041; Thu, 2 Nov 2017 20:35:22 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.89.231]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 50A365203F; Thu, 2 Nov 2017 20:35:21 +0000 (GMT) Subject: Re: [PATCH 03/27] Enforce module signatures if the kernel is locked down From: Mimi Zohar To: David Howells Cc: 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 Date: Thu, 02 Nov 2017 17:41:21 -0400 In-Reply-To: <12321.1509658211@warthog.procyon.org.uk> References: <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> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 17110221-0040-0000-0000-00000409EBA1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110221-0041-0000-0000-000020AC7991 Message-Id: <1509658881.3416.10.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-02_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711020266 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-11-02 at 21:30 +0000, David Howells wrote: > Mimi Zohar wrote: > > > By this point, IMA-appraisal has already verified the kernel module > > signature back in kernel_read_file_from_fd(), if it was required. > >  Having a key with which to verify the appended signature or requiring > > an appended signature, should not be required as well. > > I guess I don't need to put in any support for IMA here, then, and you've > taken care of it in your patchset such that it won't actually go into > module_sig_check() in that case (or will at least return immediately). 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; Mimi  From 1582991470215118646@xxx Thu Nov 02 21:31:48 +0000 2017 X-GM-THRID: 1581705993536835286 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread