Received: by 10.192.165.148 with SMTP id m20csp160867imm; Thu, 3 May 2018 17:08:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqgp/dMYF7DhMZfGO7ywUmBpZLX8T5GZzdQ0efMXPuwt+Z17IDOKuhkZfVq1fzGMutG+Nmh X-Received: by 2002:a17:902:22cc:: with SMTP id o12-v6mr26491211plg.38.1525392497129; Thu, 03 May 2018 17:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525392497; cv=none; d=google.com; s=arc-20160816; b=jBECqOKIWq5sWOyR/8Nhq65iXpgesW3Y/kzzQ/yGrta+v6drs0vQdBbsYFuKXKWdZ6 wn387RBpVDmSzk2XG3jYqGslOwS9l4SKhfAQM0OR/XzLYMSBkKGrekiyfM9ztq9BpUdD ByrcRgtB45rV1R9vfE+cBeucJ6UFdgHjJJtw9qqfLtwpsycFnYRk/ociPciXFMISInmU zLJKeaBjDqn6r++RMGpXi9/J5gOrTujv38/SWd9i7vRPKOKtspw2xgHEd5rk+bqB5MWc KFbkOkUvxJwEVBVwb+UxMMVEw/OSCKFijYkfuSqfG9ROGkzQwHgCWwnCXCNvebOWhPgy wRPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=G8R9O2lekWeyXjVZPWU7XI9DH/GroHbUuhEHNVLn2mk=; b=DhZq/rd0heH6WtbAn88AJxqjCO4iJoLAHTx8ceDUiVq536EBvHVjsRuusZ9LSMNl9C DBkiDrxC7KXagXU6pfs4Z8mgHAJ02ZoejeKzOsFsLAOd+8EFstHCsjoyt0/1cKj1To2w 6gt0yrn6MzAbhuMEXcA+URE9Hd8KUu3MNg7fV1LywatBWf/+ObGUhN8cdF/zwUs4oO3e /is8E2d40eBsAUkDuIwnnyDrJFAUhfvtuDfevT9K9cvspdKmho+1bpnuz5ZmfRskDsQh d6fXRecqHt2msyCska8naf0rnUonqdS/gcJfwFKHh6+WBpIO/m7nIUqFMP8RXhoTcc7R Db4Q== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v85-v6si12288506pgb.120.2018.05.03.17.08.02; Thu, 03 May 2018 17:08:17 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751239AbeEDAHq (ORCPT + 99 others); Thu, 3 May 2018 20:07:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:33370 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbeEDAHo (ORCPT ); Thu, 3 May 2018 20:07:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 81D27AFB3; Fri, 4 May 2018 00:07:43 +0000 (UTC) Date: Fri, 4 May 2018 00:07:43 +0000 From: "Luis R. Rodriguez" To: Mimi Zohar Cc: linux-integrity@vger.kernel.org, Hans de Goede , Ard Biesheuvel , Peter Jones , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, David Howells , "Luis R . Rodriguez" , Kees Cook , Seth Forshee , Johannes Berg , Greg Kroah-Hartman , Andres Rodriguez Subject: Re: [PATCH 3/6] firmware: differentiate between signed regulatory.db and other firmware Message-ID: <20180504000743.GR27853@wotan.suse.de> References: <1525182503-13849-1-git-send-email-zohar@linux.vnet.ibm.com> <1525182503-13849-4-git-send-email-zohar@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1525182503-13849-4-git-send-email-zohar@linux.vnet.ibm.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 01, 2018 at 09:48:20AM -0400, Mimi Zohar wrote: > Allow LSMs and IMA to differentiate between signed regulatory.db and > other firmware. > > Signed-off-by: Mimi Zohar > Cc: Luis R. Rodriguez > Cc: David Howells > Cc: Kees Cook > Cc: Seth Forshee > Cc: Johannes Berg > --- > drivers/base/firmware_loader/main.c | 5 +++++ > include/linux/fs.h | 1 + > 2 files changed, 6 insertions(+) > > diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c > index eb34089e4299..d7cdf04a8681 100644 > --- a/drivers/base/firmware_loader/main.c > +++ b/drivers/base/firmware_loader/main.c > @@ -318,6 +318,11 @@ fw_get_filesystem_firmware(struct device *device, struct fw_priv *fw_priv) > break; > } > > +#ifdef CONFIG_CFG80211_REQUIRE_SIGNED_REGDB > + if ((strcmp(fw_priv->fw_name, "regulatory.db") == 0) || > + (strcmp(fw_priv->fw_name, "regulatory.db.p7s") == 0)) > + id = READING_FIRMWARE_REGULATORY_DB; > +#endif Whoa, no way. > fw_priv->size = 0; > rc = kernel_read_file_from_path(path, &fw_priv->data, &size, > msize, id); > diff --git a/include/linux/fs.h b/include/linux/fs.h > index dc16a73c3d38..d1153c2884b9 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -2811,6 +2811,7 @@ extern int do_pipe_flags(int *, int); > id(FIRMWARE, firmware) \ > id(FIRMWARE_PREALLOC_BUFFER, firmware) \ > id(FIRMWARE_FALLBACK, firmware) \ > + id(FIRMWARE_REGULATORY_DB, firmware) \ Why could IMA not appriase these files? They are part of the standard path. Luis > id(MODULE, kernel-module) \ > id(KEXEC_IMAGE, kexec-image) \ > id(KEXEC_INITRAMFS, kexec-initramfs) \ > -- > 2.7.5 > > -- Do not panic