Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp546827imm; Tue, 15 May 2018 05:44:36 -0700 (PDT) X-Google-Smtp-Source: AB8JxZonhMp5ngnI1emhTHggXleprQ2usgVN/fGPyHzsqv8uzDYVa7Vpk7YaP1rJ0MdSNaQuXZw0 X-Received: by 2002:a17:902:6e08:: with SMTP id u8-v6mr14179746plk.96.1526388276167; Tue, 15 May 2018 05:44:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526388276; cv=none; d=google.com; s=arc-20160816; b=xxPBViqU/wkRTRR0SmfaZbhUSkM90sHTJsTAAZ36OJCwiK5TokjGScWjKfO/0k1Y8Q 92PpktKMZ5YyE/Raiz5NFGshi4ucIFKwyS+a8lvplZ0Tq5zP5Qoiz+aB+up4hZ6NKMWh YlkxXByf93n7icdgAxf3hl+DnGV55jvIQ60F1tvu5qUdBCA4ZHgh7aUsqmkwky4CKIko mmJK/GMDES4oRT3fusCA+VlzPuRA/oPqErCgU7wIktyT1YKJO0ka7RBMMuMqBqCdymXq F5Eqnr8wPMJ6sqwPQxqPSJmoXjsKa6iexmHRmTOINkUyyLLHvywQVvAtZPJ0N1LZiMQO oTIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=5p8Fgm8aaJ/v5JL2r9zWZq2WU+sC+qx/5evnilxdFxU=; b=rCZt1EWMOJoXxsgqtuxzIlzdkZZo9LeFzuirGBAr5GT7LIkxE+Ug6djxkLOPNZclSq c787xU4qubeZelaFy9V1JJt8w/g9Yy4vnZ2+pge5o8hoh52XkiXpqEnYYBj1onOmpn/F kneuCGli/JKSElb+KpfliJl4R3goTY8YdxAYBksAn00WkT3+cbYMgpc0bDcBvhFdaBiv F2A3slgiWJiEY5F4DnFDpl+5IHa59Qca5XzevtWCCpq2LuznG/k9GFzsJZKPURJ0XMg3 Xp7tXytTBlhrMCWHvTigzEGaWT1dofQTKnHX2J5YdRWeVGr1ojVTwiPtd2xpz93SoQHM SraA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=MV3EF7Uu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si2390723pld.450.2018.05.15.05.44.18; Tue, 15 May 2018 05:44:36 -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; dkim=pass header.i=@kernel.org header.s=default header.b=MV3EF7Uu; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752646AbeEOMdL (ORCPT + 99 others); Tue, 15 May 2018 08:33:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:57870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752331AbeEOMdI (ORCPT ); Tue, 15 May 2018 08:33:08 -0400 Received: from mail-qt0-f180.google.com (mail-qt0-f180.google.com [209.85.216.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 37A35217D6; Tue, 15 May 2018 12:33:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1526387588; bh=z3G8Wg1UqHkLR/12o8ULUTkDFuxYndCEUVM4wyQp05Y=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MV3EF7UuCGnF93rP1x/vNGOXvihv8ohDp7eHgrlXJUCq9I4IS0+sLDLZ6WGPwgkUu RXAq7o/oTg3DMkQSFpZoVxl+xwm2kskB4TNI/WV839wCHJAQhwwkqoNplYGxU5BRvn KbYmHy9GImvUrU8sDvoaKSQLU1PlyK31IZga4FS4= Received: by mail-qt0-f180.google.com with SMTP id g13-v6so20507291qth.8; Tue, 15 May 2018 05:33:08 -0700 (PDT) X-Gm-Message-State: ALKqPwe22uoWz5CD/ghfZwWEaMaliBegaynySVNIWVICAtoNIIOh6fvL qdnO/XXEYjKTzSURD45Z0Zh5cwf77aNywqvSlpU= X-Received: by 2002:a0c:926f:: with SMTP id 44-v6mr12898109qvz.149.1526387587110; Tue, 15 May 2018 05:33:07 -0700 (PDT) MIME-Version: 1.0 References: <20180509212212.GX27853@wotan.suse.de> <1525903617.3551.281.camel@linux.vnet.ibm.com> <20180509234814.GY27853@wotan.suse.de> <1525917658.3551.322.camel@linux.vnet.ibm.com> <20180510232639.GF27853@wotan.suse.de> <1526014826.3414.46.camel@linux.vnet.ibm.com> <20180511215250.GJ27853@wotan.suse.de> <1526302692.3898.145.camel@linux.vnet.ibm.com> <20180514192853.GM27853@wotan.suse.de> <1526349751.3937.78.camel@linux.vnet.ibm.com> <20180515032656.GR27853@wotan.suse.de> In-Reply-To: <20180515032656.GR27853@wotan.suse.de> From: Josh Boyer Date: Tue, 15 May 2018 08:32:55 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/6] firmware: differentiate between signed regulatory.db and other firmware To: mcgrof@kernel.org Cc: Mimi Zohar , Harald Hoyer , Hannes Reinecke , Johannes Thumshirn , "Eric W. Biederman" , Casey Schaufler , ast@kernel.org, David Miller , jeyu@kernel.org, Alexander Viro , One Thousand Gnomes , Matthew Garrett , Peter Jones , takahiro.akashi@linaro.org, David Howells , Linux Wireless , Kalle Valo , Seth Forshee , johannes.berg@intel.com, linux-integrity@vger.kernel.org, Hans de Goede , Ard Biesheuvel , linux-security-module , "Linux-Kernel@Vger. Kernel. Org" , Kees Cook , Greg KH , andresx7@gmail.com, Linus Torvalds , luto@kernel.org, Justin Forbes , Laura Abbott Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2018 at 11:27 PM Luis R. Rodriguez wrote: > On Mon, May 14, 2018 at 10:02:31PM -0400, Mimi Zohar wrote: > > On Mon, 2018-05-14 at 19:28 +0000, Luis R. Rodriguez wrote: > > > > - CONFIG_IMA_APPRAISE is not fine enough grained. > > > > > > > > The CONFIG_IMA_APPRAISE_FIRMWARE will be a Kconfig option. Similar > > > > Kconfig options will require kernel modules, kexec'ed image, and the > > > > IMA policy to be signed. > > > > > > Sure, it is still unclear to me if CONFIG_IMA_APPRAISE_FIRMWARE will be > > > doing firmware verification in userspace or in the kernel. > > > > The kernel is verifying signatures. > > > > > > There are a number of reasons that the kernel should be verifying > > > > firmware signatures (eg. requiring a specific version of the firmware, > > > > that was locally signed). > > > > > > Oh I agree, Linux enterprise distributions also have a strong reason to > > > have this, so that for instance we only trust and run vendor-approved > > > signed firmware. Otherwise the driver should reject the firmware. Every > > > now and then enterprise distros may run into cases were certain customers > > > may run oddball firmwares, and its unclear if we expect proper functionality > > > with that firmware. Having some form of firmware signing would help with > > > this pipeline, but this is currently dealt with at the packaging, and > > > noting other than logs ensures the driver is using an intended firmware. > > > But these needs *IMHO* have not been enough to push to generalize a kernel > > > firmware signing facility. > > > > In order for IMA-appraisal to verify firmware signatures, the > > signatures need to be distributed with the firmware. Perhaps this > > will be enough of an incentive for distros to start including firmware > > signatures in the packages. > Best to poke the maintainers about that... We have been sending mixed messages > about firmware signing over years now. Josh, heads up the new one is we can > do firmware signing through IMA future CONFIG_IMA_APPRAISE_FIRMWARE. I'll > bounce you a few emails related to this. > > > If CONFIG_IMA_APPRAISE_FIRMWARE is going to provide this functionality somehow > > > I'm happy to hear it. > > > > The functionality has been there since commit 5a9196d ("ima: add > > support for measuring and appraising firmware"). The > > security_kernel_fw_from_file() hook was later replaced with the > > generic security_kernel_read_file() hook. > Groovy, its unclear from the code on that commit how this is done, so I > suppose I need to study this a bit more. Josh, do you grok it? I haven't looked to be honest. I don't do much in the way of kernel maintenance on the distro side any longer. You already have David copied and I've added Justin Forbes and Laura Abbott to cover Fedora. One aspect that was always a concern to some is whether the firmware files were modified directly to have the signature attached to them. That may run afoul of the "no modification" license that most blobs are shipped under. Does IMA have the signatures for the files stored in xattrs or in some other detached manner? josh