Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1111307imm; Wed, 1 Aug 2018 10:21:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdUGEls6y6aPqARTLYaClB7RpPwSqyZJU8EqMKqqPYapeXcAjAvpoOFRXOHETVmI0f4L2lH X-Received: by 2002:a65:5a49:: with SMTP id z9-v6mr25671635pgs.244.1533144105288; Wed, 01 Aug 2018 10:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144105; cv=none; d=google.com; s=arc-20160816; b=vC80ozfk/KPMoTAcruXScdOzB4P1TGvG4NTm6i3io0I45T4f4O2JmKfRgy5UyroC0o idFJl58AQAOMNd78aDUyK8tvGuR0QAsdEvbLJ3J/LxvylcoP1NisMBk0AK4xB3Kv0Ne2 h9otbwBh1AnevxAc4qBDQ4I4qGu6QPc8siTL6ql6A7rGgdSP9wrsawv7jNq9BG7FzWNY mFeR3QSXiwNaeE2f3WES8OlFIHzY87/eo0MCyeB0qh9i4fajsusJDHxWC1dUW0pZt+Nr tJ2qgq97ROl93mqYpGVlrZqfe8BPlTFKHo06JD5LUys8j3sfPlT2rcHbLVGO/5VjyfpN 8xDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=5swUnWgtXTmVlQqja/WdInPM67m8DjMZ0Ct9QkEmo54=; b=RdvgdbUEZiK5+Z11IVnKiBgGUUK9XkubPxSHXs1LY6C6LnKMm/849DVYdRGecQcSuZ D2xXFXQaYXEs2I5F25d4UvJ/VlcvE+PDy1tGWnZ2VXe8OLJrgYkrDsjYvsvGj5l263nR 8IsF/iOShfH5IV34nRAzUz7qg9nEotYgD1AP/B8uu1S8jQS/JKxQKuGGfcOSBbFgqMNT YzfOVydmH/D820sNZcWjQUh+6YVbtRqeOdZCkTQBKYQBAg9WJlFwsFCHwU7q2zoOSeod 0dRWirELu9xPFtAPwrffUAtMlZvpjkxo/jAIsxx7ObXF30D6fyGV/u35ansXqwLoY8tn mbEw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a2-v6si16881338pgh.396.2018.08.01.10.21.30; Wed, 01 Aug 2018 10:21:45 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405165AbeHATGB (ORCPT + 99 others); Wed, 1 Aug 2018 15:06:01 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:48194 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2403884AbeHATGA (ORCPT ); Wed, 1 Aug 2018 15:06:00 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 9FBD4CD1; Wed, 1 Aug 2018 17:19:19 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mimi Zohar , "Luis R. Rodriguez" , David Howells , Kees Cook , "Serge E. Hallyn" , Stephen Boyd , Sasha Levin Subject: [PATCH 4.14 112/246] ima: based on policy verify firmware signatures (pre-allocated buffer) Date: Wed, 1 Aug 2018 18:50:22 +0200 Message-Id: <20180801165017.072410408@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mimi Zohar [ Upstream commit fd90bc559bfba743ae8de87ff23b92a5e4668062 ] Don't differentiate, for now, between kernel_read_file_id READING_FIRMWARE and READING_FIRMWARE_PREALLOC_BUFFER enumerations. Fixes: a098ecd firmware: support loading into a pre-allocated buffer (since 4.8) Signed-off-by: Mimi Zohar Cc: Luis R. Rodriguez Cc: David Howells Cc: Kees Cook Cc: Serge E. Hallyn Cc: Stephen Boyd Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- security/integrity/ima/ima_main.c | 1 + 1 file changed, 1 insertion(+) --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -379,6 +379,7 @@ int ima_read_file(struct file *file, enu static int read_idmap[READING_MAX_ID] = { [READING_FIRMWARE] = FIRMWARE_CHECK, + [READING_FIRMWARE_PREALLOC_BUFFER] = FIRMWARE_CHECK, [READING_MODULE] = MODULE_CHECK, [READING_KEXEC_IMAGE] = KEXEC_KERNEL_CHECK, [READING_KEXEC_INITRAMFS] = KEXEC_INITRAMFS_CHECK,