Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1985899pxx; Sat, 31 Oct 2020 04:54:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlG2ScUhBd2KMJXvih53ufMJDm7w5+cCkRb2Q8IHVgpQxSdU3p63CKTnDFKTyFwGOhpQjT X-Received: by 2002:a05:6402:22d9:: with SMTP id dm25mr7172519edb.182.1604145258466; Sat, 31 Oct 2020 04:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604145258; cv=none; d=google.com; s=arc-20160816; b=SgEwO491Ylj05QkPqtKmb5lkkESHjYQjD9pQF1ISChwaV4bGYWgXyFx1i1t9uU3iTa xzcgs9TNyxj9qGlI+q23utiKie6Z23XSg7aSdYhKjh0B9gM6Rh7Am3jpyPk65STDJMJu ZRTw9FNpfJ969syS+DbGS/JlQqj9PBXMKA9QnnBdSqhYpLswVS++NpfB7QfvG0AVXP5W h6HXc/F10/v+HzrUsxTvsIU8XqjL9mUogFTXuRM9gq3e7hTE1P+o/xqPKHKAgMaiPBiZ dK7JdUqfMHyRtm05/7x3qEU/jwOFZNXgVVKU6DxSyd4T0flYehvEi3TXHJRUHWAs9emm ZZpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=H+zFpNdSGXIz4ll7XBLPh2E6MLlh2sxRdibsP3PenDA=; b=HcgbH+ITi/4Vy8E4BL/hp0DtJPpv999hFRT0dEUsA9fwrEsdfqqYRyDht8yJyUfyXA 64FwjvNPOcqmkGTY7qk8S3iM8Z3CjtzbZzLBJyguPQAYWE08GxZEdjT+qGz/o09FqLbX z2XOF62sEhOe6/wL8LTe0jUmIuSW3x5V6KGbtaFwpjEC1gso5FjAso06UoRmlBLDYMCJ uBr4uzhSYodAkbGPln9HM5OaS/Jpy5eus9JgbyCtWmKrUg0qy2pGlto794CIc40WIv+o /1r199DRIObaYWYd1SzkmXAqHGE/o8UvYf8nTXX2bIfWWne/Jr4LhEHkekou4Ysdw1QZ NnJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jjyZTqOz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx12si30458edb.415.2020.10.31.04.53.55; Sat, 31 Oct 2020 04:54:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jjyZTqOz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727569AbgJaLlM (ORCPT + 99 others); Sat, 31 Oct 2020 07:41:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:39916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727559AbgJaLlB (ORCPT ); Sat, 31 Oct 2020 07:41:01 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5FF2920791; Sat, 31 Oct 2020 11:41:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604144461; bh=VV/tAmNQ4bx5LSG6mS5ASZFVS/ylzdW2u5eTRa9Y5io=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jjyZTqOzN81S2jjJEDGKX9cw7qMhGRScnVDZc0KmjlIUScUPBe9ydNV/ySNGkIHtN jeacwXjf1CpHJU1/LCCdIE3ID73s5E3a6DmokbYb948eKK5TLx65t52t2oBmx5D2k/ z4vUYYsmIi1L5zRWDoyRZuVfBk5GuJpvTIkEhJso= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kees Cook , Luis Chamberlain , Scott Branden Subject: [PATCH 5.8 19/70] fs/kernel_read_file: Remove FIRMWARE_EFI_EMBEDDED enum Date: Sat, 31 Oct 2020 12:35:51 +0100 Message-Id: <20201031113500.430407586@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201031113459.481803250@linuxfoundation.org> References: <20201031113459.481803250@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kees Cook commit 06e67b849ab910a49a629445f43edb074153d0eb upstream. The "FIRMWARE_EFI_EMBEDDED" enum is a "where", not a "what". It should not be distinguished separately from just "FIRMWARE", as this confuses the LSMs about what is being loaded. Additionally, there was no actual validation of the firmware contents happening. Fixes: e4c2c0ff00ec ("firmware: Add new platform fallback mechanism and firmware_request_platform()") Signed-off-by: Kees Cook Reviewed-by: Luis Chamberlain Acked-by: Scott Branden Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201002173828.2099543-3-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman --- drivers/base/firmware_loader/fallback_platform.c | 2 +- include/linux/fs.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) --- a/drivers/base/firmware_loader/fallback_platform.c +++ b/drivers/base/firmware_loader/fallback_platform.c @@ -17,7 +17,7 @@ int firmware_fallback_platform(struct fw if (!(opt_flags & FW_OPT_FALLBACK_PLATFORM)) return -ENOENT; - rc = security_kernel_load_data(LOADING_FIRMWARE_EFI_EMBEDDED); + rc = security_kernel_load_data(LOADING_FIRMWARE); if (rc) return rc; --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3011,7 +3011,6 @@ extern int do_pipe_flags(int *, int); id(UNKNOWN, unknown) \ id(FIRMWARE, firmware) \ id(FIRMWARE_PREALLOC_BUFFER, firmware) \ - id(FIRMWARE_EFI_EMBEDDED, firmware) \ id(MODULE, kernel-module) \ id(KEXEC_IMAGE, kexec-image) \ id(KEXEC_INITRAMFS, kexec-initramfs) \