Received: by 10.223.164.221 with SMTP id h29csp2680571wrb; Thu, 2 Nov 2017 15:32:10 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QMtyC3+3WVNS6Fa2bXffu+iP/483aZEpHdyRQkAMJG+PPjzOS1GQMZZUZbCgJO5YJrWbTs X-Received: by 10.98.8.74 with SMTP id c71mr5485193pfd.101.1509661930227; Thu, 02 Nov 2017 15:32:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509661930; cv=none; d=google.com; s=arc-20160816; b=kG/IaatGa5kShWGIKhMyX2wZrQ2xDOfWTAtJb6F1ztHeC6KkeXifr67WCT3FR+JfGo gtA6kZtoqK57mqztkMmpFEWUp3RJqzURkaXQsKFrq9mRoaQV/a/j4jofPX3YmK8F3Q5m fF4fSOYIjAjEEmxMbOrWcmWBpIRxHXho9uZ48ucgPq/3qVGS6SGJTO7RcdNNcbUjapAO cZWH37qkpC4y47ggAR7LwB+dyikaOJ1rQVe/8VNfU6A9hZWin5yQj496pJGTHN5ilul6 IJO4wQbZEtP5Wblh22xCUWz3xSc+Iz9om/8osLqU/7PWvyp1HW86w9UC3UyzdyFdXmEa WgTA== 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=EBPshN0bK+YI6KsN4qY8b6qMGQfonbdlK54Tpwb5rZY=; b=gzvv/0d4U9vhMZv7OJ/mmJLZADt1q5dxE5axnkCgWH7cUPFFy2FSNG0q71TGNilZVz CIN7SM7DsPyU8n21+ECm8WNyK2a36W/jnRqW4oF9z6eSMYfSvn7ahs01cpBz1w31apdK klBNgS+IxrnKwb5i3oaXQ9hGrO8fBGjiIeDmDqar3DJtUYZaJtfIKSS6DFoGHU3fquzK 3slhAFGDBJ0s7CQ0emHRhVrZlRjhjhi0R8fDHK/YVlxlcsD2p2miv4ZJ+fD6Ls9/1wfp BUoViN50oF5qU7J28++583oDZJ6MMRGLzqpY+kPs/HL35x0BP4unU4avi78zkO8xUgS8 GShA== 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 e8si3120892pls.511.2017.11.02.15.31.56; Thu, 02 Nov 2017 15:32:10 -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 S934618AbdKBWSx (ORCPT + 99 others); Thu, 2 Nov 2017 18:18:53 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41008 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934607AbdKBWSv (ORCPT ); Thu, 2 Nov 2017 18:18:51 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA2MIhO3025043 for ; Thu, 2 Nov 2017 18:18:51 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e07q8cvm9-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 02 Nov 2017 18:18:50 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 Nov 2017 22:18:48 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 2 Nov 2017 22:18:45 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA2MIjSK30015526; Thu, 2 Nov 2017 22:18:45 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 40FD2A408E; Thu, 2 Nov 2017 22:13:50 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1AB35A4088; Thu, 2 Nov 2017 22:13:49 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.89.231]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 2 Nov 2017 22:13:48 +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 18:18:43 -0400 In-Reply-To: <14108.1509660067@warthog.procyon.org.uk> 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> <14108.1509660067@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: 17110222-0016-0000-0000-000004FCEDCE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110222-0017-0000-0000-000028388006 Message-Id: <1509661123.3416.29.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-02_08:,, 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-1711020273 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 22:01 +0000, David Howells wrote: > 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()) && The above IMA checks aren't needed here. > !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. Then at least for now, document that even though kernel modules might be signed and verified by IMA-appraisal, that in lockdown mode they also require an appended signature. Mimi From 1582993391809714294@xxx Thu Nov 02 22:02:20 +0000 2017 X-GM-THRID: 1581705993536835286 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread