Received: by 10.192.165.156 with SMTP id m28csp29910imm; Thu, 12 Apr 2018 15:53:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/fnHkqwoZImW4picIKL4M1bQS/Ev/5rAXkdvfFFXULf/xobq5rdlaCrMH2KIZoF5eVHPjO X-Received: by 10.98.180.24 with SMTP id h24mr9234217pfn.213.1523573582404; Thu, 12 Apr 2018 15:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523573582; cv=none; d=google.com; s=arc-20160816; b=0Cz7TA+9DwjG7UXgIIiXX9oFw1xgM9Lx9j31qq9NXfIRjsFKb741p82HXEyVsFuajf yTvVq1FQ8YoNHZ0r+cgfQs7MzyAQ9/UmF+wnCI+Dzi2LFBfrBhd+UVyCCSrs8MCnkgBc NfLZ80ZuDbUfnmrakqHZ4zMNgSCBE8ZwAUd4eGd9CYXqj+f4oP4+ZGgGWvOjJkvRM5YV xpkRwsULJ46EnDAZZRJFGadlXOUs92KUWhO0YQqHqpwjRa9yXVhrv7/iIbYamMHsIvm8 nJfPbC7lN1ZqlG9iHXmFGDrlBwX4fTEXmOVVm1PhAAsDQ6q+ZHNrxk5XCwkyiJigqkE6 CD9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7/RWY2wIdhDzt7HMCMjSH70wvlKOz1Zmhkfah2TjxP4=; b=St1QrDG2sLiheMS5nWZagjP4b1xn2zFReRSnDcbR4gzwFklOOZh4NS29ZGVfW/xqO7 mHW+WFSkiKhAz64ag2RoPkA9+A6l1A/yK0rREVs+LIRn2M4UryUTwTRplP47rQbzW/Sy u5v7hVFT0vHel3+7BcLQrYAuV6n33i6clg4E/qCF1BEkVSiH0MobhRAg9kkm81pFJ76o ZuqmNQixT5rJMBp6WuCBzEHrgfgN7r6fxrkyL5lXPOyx0ZND5XTUq/VqougLEIkXQ7q+ wX4y/8dkiiAcvNbjxoaacAp/qgksFzWNvY6puxa1JSP+qIP0qYROmdpspATpxYczzAi1 LWqw== 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 s11si2838187pgp.680.2018.04.12.15.52.35; Thu, 12 Apr 2018 15:53:02 -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 S1753461AbeDLWmJ (ORCPT + 99 others); Thu, 12 Apr 2018 18:42:09 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58060 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752847AbeDLWmH (ORCPT ); Thu, 12 Apr 2018 18:42:07 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3CMfjQX039979 for ; Thu, 12 Apr 2018 18:42:07 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2haenk445g-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Thu, 12 Apr 2018 18:42:06 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Apr 2018 23:42:04 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 12 Apr 2018 23:42:01 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3CMg0Tq53739724; Thu, 12 Apr 2018 22:42:00 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 991FFAE051; Thu, 12 Apr 2018 23:31:55 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 51584AE045; Thu, 12 Apr 2018 23:31:54 +0100 (BST) Received: from localhost.ibm.com (unknown [9.80.84.218]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 12 Apr 2018 23:31:54 +0100 (BST) From: Mimi Zohar To: David Howells Cc: Matthew Garrett , Mimi Zohar , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, Eric Biederman , kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] kexec: limit kexec_load syscall Date: Thu, 12 Apr 2018 18:41:48 -0400 X-Mailer: git-send-email 2.7.5 X-TM-AS-GCONF: 00 x-cbid: 18041222-0044-0000-0000-00000546AADE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041222-0045-0000-0000-00002886E7E4 Message-Id: <1523572911-16363-1-git-send-email-zohar@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-12_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1804120213 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In environments that require the kexec kernel image to be signed, prevent using the kexec_load syscall. In order for LSMs and IMA to differentiate between kexec_load and kexec_file_load syscalls, this patch set adds a call to security_kernel_read_file() in kexec_load_check(). Signed-off-by: Mimi Zohar Mimi Zohar (3): ima: based on the "secure_boot" policy limit syscalls kexec: call LSM hook for kexec_load syscall ima: based on policy require signed kexec kernel images kernel/kexec.c | 11 +++++++++++ security/integrity/ima/ima.h | 1 + security/integrity/ima/ima_main.c | 9 +++++++++ security/integrity/ima/ima_policy.c | 27 ++++++++++++++++++++------- 4 files changed, 41 insertions(+), 7 deletions(-) -- 2.7.5