Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3377853imm; Thu, 17 May 2018 07:53:12 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpwUPqhTrlI/SPpGxLmS8YiNng7mwdjztebEcCitQfQYhLK6DdWuG7yJlWpaBvnEP2yvTgT X-Received: by 2002:a63:2c13:: with SMTP id s19-v6mr4377150pgs.427.1526568792436; Thu, 17 May 2018 07:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526568792; cv=none; d=google.com; s=arc-20160816; b=xvvyR+bJkCOrueCMu1gPiBszl4fTv9rQqIyfPpNEB/ty6oNTfDrKO+YQYXJR+xMNYS SnHBDInMxZCSpAsZvdnVas4wkLMytFyYql0GLK7mDZVdr/xTKmiG1P8x7ES8XOzPsptB ydIs2NrtaeFACD6oT0zPprHyTA6YMvNHeKbQLS9Q1NaZIQkBtdWKapfdopU/PMzZd5yc 56ltYdwGTPU9mBiGR1LaJktyucQTyj1ljd7OCDMGzXNmb2iCG5EJo1H2b4d0mAWG7SzY uaD1STd54ep0aytCUy9hYNCu8qkZk2tiG1cwumPQ2v31paAmdSTIRbacRtKYOCZKNTYT OnLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=X+csqfwNgRkT/gUWAR2+jRUi5CcIP5+MV+rIjj7yeU0=; b=os2qbrjioyfKsRKDlvCd4n1puYc9+fNMVWRGTOHpfxfbEWbPnYqqi3sUjXyXTuW6VM DT12MyrI7MPz8/BEMZSMEdkRPLqs7rIyb4BVhtnIBAtoeQANFzv1jkrmqFFd8BfvqZgf 7KK5IpFq8Pmq7d/qPt65xDH6xm3aFtIZ0quoF4UErVPWeXGg4R08/yy/5VBNigMgagNb kX/4lvWYKG3lciXvZ+qAM7V7tf5UwNfi0rlU8EmMQiKLE1j3Yjki2UByQwU0IZZAekLP 7YJVfECAuPJsysh1vAPbzJ2hdRAYy/UN5mTKFTApZUSol3nc9TSl1eMwAOtIcCvBcWxx BnGQ== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14-v6si5122530plr.131.2018.05.17.07.52.27; Thu, 17 May 2018 07:53:12 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752479AbeEQOtm (ORCPT + 99 others); Thu, 17 May 2018 10:49:42 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39176 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbeEQOth (ORCPT ); Thu, 17 May 2018 10:49:37 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4HEjQ9M116861 for ; Thu, 17 May 2018 10:49:37 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j1bj8gy1d-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 17 May 2018 10:49:36 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 May 2018 15:49:34 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 17 May 2018 15:49:30 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4HEnTBv56033344; Thu, 17 May 2018 14:49:29 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5F6FA4C044; Thu, 17 May 2018 15:41:18 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67F454C04E; Thu, 17 May 2018 15:41:16 +0100 (BST) Received: from localhost.ibm.com (unknown [9.80.108.64]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 17 May 2018 15:41:16 +0100 (BST) From: Mimi Zohar To: linux-integrity@vger.kernel.org Cc: Mimi Zohar , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, David Howells , "Luis R . Rodriguez" , Eric Biederman , kexec@lists.infradead.org, Andres Rodriguez , Greg Kroah-Hartman , Ard Biesheuvel , "Luis R . Rodriguez" , Kees Cook , "Serge E . Hallyn" , Stephen Boyd Subject: [PATCH v2 1/9] ima: based on policy verify firmware signatures (pre-allocated buffer) Date: Thu, 17 May 2018 10:48:42 -0400 X-Mailer: git-send-email 2.7.5 In-Reply-To: <1526568530-9144-1-git-send-email-zohar@linux.vnet.ibm.com> References: <1526568530-9144-1-git-send-email-zohar@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18051714-0008-0000-0000-000004F78F68 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051714-0009-0000-0000-00001E8C0559 Message-Id: <1526568530-9144-2-git-send-email-zohar@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-17_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 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-1805170137 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Don't differentiate 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 --- security/integrity/ima/ima_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c index e771b736aa03..83f84928ad76 100644 --- a/security/integrity/ima/ima_main.c +++ b/security/integrity/ima/ima_main.c @@ -447,6 +447,7 @@ int ima_read_file(struct file *file, enum kernel_read_file_id read_id) 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, -- 2.7.5