Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932428AbcCHOiq (ORCPT ); Tue, 8 Mar 2016 09:38:46 -0500 Received: from e28smtp06.in.ibm.com ([125.16.236.6]:55153 "EHLO e28smtp06.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754307AbcCHOic (ORCPT ); Tue, 8 Mar 2016 09:38:32 -0500 X-IBM-Helo: d28relay04.in.ibm.com X-IBM-MailFrom: zohar@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org;keyrings@vger.kernel.org;linux-security-module@vger.kernel.org Message-ID: <1457447893.5321.120.camel@linux.vnet.ibm.com> Subject: Re: [RFC PATCH 12/12] IMA: Use the the system trusted keyrings instead of .ima_mok [ver #2] From: Mimi Zohar To: Petko Manolov Cc: David Howells , linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 08 Mar 2016 09:38:13 -0500 In-Reply-To: <20160308141429.GC2243@p310> References: <1457403993.5321.33.camel@linux.vnet.ibm.com> <20160304150022.17121.34501.stgit@warthog.procyon.org.uk> <20160304150149.17121.31855.stgit@warthog.procyon.org.uk> <30481.1457442516@warthog.procyon.org.uk> <20160308141429.GC2243@p310> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 16030814-0021-0000-0000-00000A920980 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1445 Lines: 33 On Tue, 2016-03-08 at 16:14 +0200, Petko Manolov wrote: > On 16-03-08 13:08:36, David Howells wrote: > > Mimi Zohar wrote: > > > > > Only certificates signed by a key on the system keyring were added to > > > the IMA keyring, unless IMA_MOK_KEYRING was configured. Then, the > > > certificate could be signed by a either a key on the system or ima_mok > > > keyrings. To replicate this behavior, the default behavior should be to > > > only permit certificates signed by a key on the builtin keyring, unless > > > this new Kconfig is enabled. Only then, permit certificates signed by a > > > key on either the builtin or secondary keyrings to be added to the IMA > > > keyring. > > > > How about I change it to a choice-type item, with the following options: > > > > (1) No addition. > > > > (2) Addition restricted by built-in keyring. > > > > (3) Addition restricted by secondary keyring + built-in keyring. > > > > where the second and third options then depend on the appropriate keyrings > > being enabled. > > I would suggest leaving (1) and (3). Since secondary keyring only accepts keys > signed by certificate in the system keyring I think (2) is redundant. It adds > extra complexity (Kconfig is vague enough already) while it doesn't increase the > overall security by much. I think you mean option 2 or 3, as option 1 implies not allowing any keys to be added to the IMA keyring. Mimi