From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755340AbdKNNRj (ORCPT ); Tue, 14 Nov 2017 08:17:39 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53088 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754706AbdKNNRZ (ORCPT ); Tue, 14 Nov 2017 08:17:25 -0500 Subject: Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown From: Mimi Zohar To: Greg Kroah-Hartman Cc: Linus Torvalds , David Howells , Alan Cox , "Luis R. Rodriguez" , "AKASHI, Takahiro" , Jan Blunck , Julia Lawall , Marcus Meissner , Gary Lin , LSM List , linux-efi , Linux Kernel Mailing List , Matthew Garrett Date: Tue, 14 Nov 2017 08:17:14 -0500 In-Reply-To: <20171114123856.GA31142@kroah.com> References: <20171108194626.GQ22894@wotan.suse.de> <20171109014841.GF7859@linaro.org> <1510193857.4484.95.camel@linux.vnet.ibm.com> <20171109044619.GG7859@linaro.org> <20171111023240.2398ca55@alans-desktop> <20171113174250.GA22894@wotan.suse.de> <20171113210848.4dc344bd@alans-desktop> <454.1510609487@warthog.procyon.org.uk> <1510662098.3711.139.camel@linux.vnet.ibm.com> <20171114123856.GA31142@kroah.com> 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: 17111413-0040-0000-0000-0000040E2095 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17111413-0041-0000-0000-000020B0D3D1 Message-Id: <1510665434.3711.158.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-14_05:,, 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-1709140000 definitions=main-1711140182 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-11-14 at 13:38 +0100, Greg Kroah-Hartman wrote: > On Tue, Nov 14, 2017 at 07:21:38AM -0500, Mimi Zohar wrote: > > On Mon, 2017-11-13 at 14:09 -0800, Linus Torvalds wrote: > > > On Mon, Nov 13, 2017 at 1:44 PM, David Howells wrote: > > > > > > > > Whilst that may be true, we either have to check signatures on every bit of > > > > firmware that the appropriate driver doesn't say is meant to be signed or not > > > > bother. > > > > > > I vote for "not bother". > > > > > > Seriously, if you have firmware in /lib/firmware, and you don't trust > > > it, what the hell are you doing? > > > > I might "trust" the files in /lib/firmware, but I also want to make > > sure that they haven't changed.  File signatures provide file > > provenance and integrity guarantees. > > Then "verify" them with signatures that you generate yourself. Like > dm-verify does for the partition that you put the firmware on. The discussion, here, is in the context of the "lockdown" patch set, without IMA-appraisal configured.  Kernel modules and the kexec kernel image require file signatures in lockdown mode.  An equivalent method of requiring file signatures for firmware (without IMA-appraisal) does not exist. I posted the patch [RFC PATCH v2] "fw_lockdown: new micro LSM module to prevent loading unsigned firmware".  The patch and discussion can be found here - (https://lkml.org/lkml/2017/11/13/217). Mimi From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mimi Zohar Subject: Re: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown Date: Tue, 14 Nov 2017 08:17:14 -0500 Message-ID: <1510665434.3711.158.camel@linux.vnet.ibm.com> References: <20171108194626.GQ22894@wotan.suse.de> <20171109014841.GF7859@linaro.org> <1510193857.4484.95.camel@linux.vnet.ibm.com> <20171109044619.GG7859@linaro.org> <20171111023240.2398ca55@alans-desktop> <20171113174250.GA22894@wotan.suse.de> <20171113210848.4dc344bd@alans-desktop> <454.1510609487@warthog.procyon.org.uk> <1510662098.3711.139.camel@linux.vnet.ibm.com> <20171114123856.GA31142@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20171114123856.GA31142-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Greg Kroah-Hartman Cc: Linus Torvalds , David Howells , Alan Cox , "Luis R. Rodriguez" , "AKASHI, Takahiro" , Jan Blunck , Julia Lawall , Marcus Meissner , Gary Lin , LSM List , linux-efi , Linux Kernel Mailing List , Matthew Garrett List-Id: linux-efi@vger.kernel.org On Tue, 2017-11-14 at 13:38 +0100, Greg Kroah-Hartman wrote: > On Tue, Nov 14, 2017 at 07:21:38AM -0500, Mimi Zohar wrote: > > On Mon, 2017-11-13 at 14:09 -0800, Linus Torvalds wrote: > > > On Mon, Nov 13, 2017 at 1:44 PM, David Howells wrote: > > > > > > > > Whilst that may be true, we either have to check signatures on every bit of > > > > firmware that the appropriate driver doesn't say is meant to be signed or not > > > > bother. > > > > > > I vote for "not bother". > > > > > > Seriously, if you have firmware in /lib/firmware, and you don't trust > > > it, what the hell are you doing? > > > > I might "trust" the files in /lib/firmware, but I also want to make > > sure that they haven't changed.  File signatures provide file > > provenance and integrity guarantees. > > Then "verify" them with signatures that you generate yourself. Like > dm-verify does for the partition that you put the firmware on. The discussion, here, is in the context of the "lockdown" patch set, without IMA-appraisal configured.  Kernel modules and the kexec kernel image require file signatures in lockdown mode.  An equivalent method of requiring file signatures for firmware (without IMA-appraisal) does not exist. I posted the patch [RFC PATCH v2] "fw_lockdown: new micro LSM module to prevent loading unsigned firmware".  The patch and discussion can be found here - (https://lkml.org/lkml/2017/11/13/217). Mimi From mboxrd@z Thu Jan 1 00:00:00 1970 From: zohar@linux.vnet.ibm.com (Mimi Zohar) Date: Tue, 14 Nov 2017 08:17:14 -0500 Subject: Firmware signing -- Re: [PATCH 00/27] security, efi: Add kernel lockdown In-Reply-To: <20171114123856.GA31142@kroah.com> References: <20171108194626.GQ22894@wotan.suse.de> <20171109014841.GF7859@linaro.org> <1510193857.4484.95.camel@linux.vnet.ibm.com> <20171109044619.GG7859@linaro.org> <20171111023240.2398ca55@alans-desktop> <20171113174250.GA22894@wotan.suse.de> <20171113210848.4dc344bd@alans-desktop> <454.1510609487@warthog.procyon.org.uk> <1510662098.3711.139.camel@linux.vnet.ibm.com> <20171114123856.GA31142@kroah.com> Message-ID: <1510665434.3711.158.camel@linux.vnet.ibm.com> To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org On Tue, 2017-11-14 at 13:38 +0100, Greg Kroah-Hartman wrote: > On Tue, Nov 14, 2017 at 07:21:38AM -0500, Mimi Zohar wrote: > > On Mon, 2017-11-13 at 14:09 -0800, Linus Torvalds wrote: > > > On Mon, Nov 13, 2017 at 1:44 PM, David Howells wrote: > > > > > > > > Whilst that may be true, we either have to check signatures on every bit of > > > > firmware that the appropriate driver doesn't say is meant to be signed or not > > > > bother. > > > > > > I vote for "not bother". > > > > > > Seriously, if you have firmware in /lib/firmware, and you don't trust > > > it, what the hell are you doing? > > > > I might "trust" the files in /lib/firmware, but I also want to make > > sure that they haven't changed. ?File signatures provide file > > provenance and integrity guarantees. > > Then "verify" them with signatures that you generate yourself. Like > dm-verify does for the partition that you put the firmware on. The discussion, here, is in the context of the "lockdown" patch set, without IMA-appraisal configured. ?Kernel modules and the kexec kernel image require file signatures in lockdown mode. ?An equivalent method of requiring file signatures for firmware (without IMA-appraisal) does not exist. I posted the patch [RFC PATCH v2] "fw_lockdown: new micro LSM module to prevent loading unsigned firmware". ?The patch and discussion can be found here - (https://lkml.org/lkml/2017/11/13/217). Mimi -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html