Received: by 10.223.164.221 with SMTP id h29csp1094956wrb; Fri, 27 Oct 2017 11:49:19 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SPbKhjQPFZvvKnjU47mySOV5y31Eyr5xeOznv2iQ6pFSF2+LsHmF0cIiBC8WM4m1COq6Gp X-Received: by 10.84.193.129 with SMTP id f1mr1039757pld.248.1509130159235; Fri, 27 Oct 2017 11:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509130159; cv=none; d=google.com; s=arc-20160816; b=TbPin62l2lYy+77ogetzoH2t/5YD+jQPP2UQW5190jW2RUrle+d7l5H0jnKnp8pE1z BhzqUKcuVTRp/JAMVXorxNIVKnpoSK8QA46jnuAd1ohE4KojpKm/Jo6FW3GsN4b8EJmJ kJK+a/q4KgoNHuiAIXK+IvMP/B+T+ZcJ9NXJW10OGluhw0M4/yo7PxK1wrYeObBmTOHF 8mxsFfRKF50iJj+lJYYqWFIdzoVW3aZ6oM+b3WyG7cMzE35pFKkj+B1TuQv/YhZje/wi stJXteHaGnHRedvJxxYrhAcEeYIX7oyPsRGrIMN5D8xA6rtethgFMqjzxkRY2irmKntV YAvA== 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=7rXsXiTTdR8vEKGEcm+NjwWfHasfyd2qMsG55nCcVD8=; b=Dw3IVgoeGQ6eZWG6v6TDG8sC5jtfFyfFoE7vuOCBRNJKJISbSUy+bBesBCdJlpM0eK iHanUtrfMhYyPa54b1q5T8m1P6y37UKpOXjXMc5ECiu0cJhuXTpQGKB8SV5xSAxmctNa mC+H1RXX2IbJafZuSyDH9qrNcDFusyYoaEIQ8IY+55JTPdiOlnXBD5mX7bMpojrZmpse IBHFEFqVSJABh2y1CSmUeosO+uj5/HnYTeF8PsZVGTOmp4qF9Ie1SfmaqWEawWuIJl0P HaRccMKMdre0t9D7W0U7INsjZIOIqovk3DkgnbxhaWwnZwgFwn/rYbGbyG0zzl7+luID 8VgQ== 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 q68si5762833pfb.223.2017.10.27.11.49.05; Fri, 27 Oct 2017 11:49:19 -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 S1752657AbdJ0Ss1 (ORCPT + 99 others); Fri, 27 Oct 2017 14:48:27 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:50818 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752112AbdJ0SsZ (ORCPT ); Fri, 27 Oct 2017 14:48:25 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9RImG8r133963 for ; Fri, 27 Oct 2017 14:48:24 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dv5smpggg-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 27 Oct 2017 14:48:24 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Oct 2017 19:48:22 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 27 Oct 2017 19:48:17 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9RImHMQ31850556; Fri, 27 Oct 2017 18:48:17 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7477A4C04A; Fri, 27 Oct 2017 19:43:52 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 61E814C046; Fri, 27 Oct 2017 19:43:51 +0100 (BST) Received: from localhost.localdomain (unknown [9.80.110.22]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 27 Oct 2017 19:43:51 +0100 (BST) Subject: Re: [PATCH 03/27] Enforce module signatures if the kernel is locked down From: Mimi Zohar To: David Howells , linux-security-module@vger.kernel.org Cc: 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: Fri, 27 Oct 2017 14:48:15 -0400 In-Reply-To: <150842465546.7923.6762214527898273559.stgit@warthog.procyon.org.uk> References: <150842463163.7923.11081723749106843698.stgit@warthog.procyon.org.uk> <150842465546.7923.6762214527898273559.stgit@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: 17102718-0008-0000-0000-000004A4B7CA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17102718-0009-0000-0000-00001E372ED0 Message-Id: <1509130095.3716.13.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-27_09:,, 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-1710270244 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-10-19 at 15:50 +0100, David Howells wrote: > If the kernel is locked down, require that all modules have valid > signatures that we can verify. > > Signed-off-by: David Howells > --- > > kernel/module.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/kernel/module.c b/kernel/module.c > index de66ec825992..3d9a3270c179 100644 > --- a/kernel/module.c > +++ b/kernel/module.c > @@ -2781,7 +2781,8 @@ static int module_sig_check(struct load_info *info, int flags) > } > > /* Not having a signature is only an error if we're strict. */ > - if (err == -ENOKEY && !sig_enforce) > + if (err == -ENOKEY && !sig_enforce && > + !kernel_is_locked_down("Loading of unsigned modules"))   This kernel_is_locked_down() check is being called for both the original and new module_load syscalls.  We need to be able differentiate them.  This is fine for the original syscall, but for the new syscall we would need an additional IMA check - !is_ima_appraise_enabled(). Mimi   > err = 0; > > return err; From 1581820698923712657@xxx Fri Oct 20 23:22:53 +0000 2017 X-GM-THRID: 1581705993536835286 X-Gmail-Labels: Inbox,Category Forums