Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp675844yba; Fri, 3 May 2019 08:40:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqypYZxq4OFT8GzQhHeEL8RqoVj8+OCqT82E+ot5irC7CIp4x8TuWnSnSUfTANw6tkU5KiJ+ X-Received: by 2002:a17:902:8b83:: with SMTP id ay3mr11094664plb.187.1556898041674; Fri, 03 May 2019 08:40:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556898041; cv=none; d=google.com; s=arc-20160816; b=Zi+Rsi7nV2TLSt19CWrNG8ixPXtvgdv/zCPZBsaoWMTt+U9qEiL3/cTHwMpCsJd7HF q3Ss9k0YS0+wabH1rDfHy0Yuj2GQFTKgXmCBQ/PzXyzjxIU5dRjmu4tGAhI0DepeSlFv 9VY06nBltsOJM8MU7Shob5HM202nQoeCfBZJeFp11N7ZSYscg0TazJ24/Oqj8pbDf2KB vX2RjS/0Ovdmb9sml0EgZZmJ4g6x9FU2HaIMOUrzkOrQ1fFbF2HbEZ3Q16B1qP4c+HFF Hzk3nm8d5NaacRsqEV0UoGwuCVTMqmAdNHAUHDfbMLHlm0c91SR5Qp4X8Ynl9xCdBKyv CXbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject; bh=cfan7gaclHWPZTypLAzi++qjKNaiyeieI6DMiuU+8i4=; b=IseemmfOT6XKsSqaVos7qiUpYPrbjMwdTdNQhyt0P4B2KMnS9ALbbeEYPT0vj3Xfql lFlxlVtY4jFee7pGh+TfGSzTmHP3PLYo+XK3pVogyToBlfkKwtTwIYxCkhAnKFDXNPbP 8lRz7mCSu+MgyW9BgH9BeuWtY4LNrSxbLuYTxk3xoEFuYfvTUs0kUi/P4eDlT95OGovd lFVYXNhis3AmtoPshjs1OLbrM4bVi3u2xAl0jAss4htgqlsqmh3rAIW8G7j8YBvqFj0z bC/QnpBCcATr4EpKZhU0m5L6ucwxdAnIPsytgx1MwVmPR3dlbpnTw6FVDqav69Jw4OOZ APlQ== 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 j6si2754185pfr.140.2019.05.03.08.40.19; Fri, 03 May 2019 08:40:41 -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 S1727992AbfECOZJ (ORCPT + 99 others); Fri, 3 May 2019 10:25:09 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56254 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727882AbfECOZJ (ORCPT ); Fri, 3 May 2019 10:25:09 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x43EMZ02078580 for ; Fri, 3 May 2019 10:25:08 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2s8pvjhgmv-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 03 May 2019 10:25:07 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 May 2019 15:25:05 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 3 May 2019 15:25:02 +0100 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x43EP1Nv40763456 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 May 2019 14:25:01 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B1AAFA4067; Fri, 3 May 2019 14:25:01 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9EE52A405B; Fri, 3 May 2019 14:25:00 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.95.126]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 3 May 2019 14:25:00 +0000 (GMT) Subject: Re: [PATCH] kexec_buffer measure From: Mimi Zohar To: Tetsuo Handa , Casey Schaufler , prakhar srivastava Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module , Paul Moore , John Johansen Date: Fri, 03 May 2019 10:24:49 -0400 In-Reply-To: <5490e443-b3ea-876e-a6b3-6a91005afe61@I-love.SAKURA.ne.jp> References: <1555978681.4914.305.camel@linux.ibm.com> <1556812101.4134.28.camel@linux.ibm.com> <7af61ebe-28a8-799c-fe47-d72f247494ed@schaufler-ca.com> <5490e443-b3ea-876e-a6b3-6a91005afe61@I-love.SAKURA.ne.jp> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19050314-0020-0000-0000-00000338F15E X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19050314-0021-0000-0000-0000218B7E8A Message-Id: <1556893489.4754.45.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-03_08:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905030091 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-05-03 at 09:53 +0900, Tetsuo Handa wrote: > On 2019/05/03 1:28, Casey Schaufler wrote: > > On 5/2/2019 8:48 AM, Mimi Zohar wrote: > >> [Cc'ing Paul, John, Casey] > >> > >> On Mon, 2019-04-22 at 20:18 -0400, Mimi Zohar wrote: > >>> [Cc'ing LSM mailing list] > >>> > >>> On Fri, 2019-04-19 at 17:30 -0700, prakhar srivastava wrote: > >>> > >>>> 2) Adding a LSM hook > >>>> We are doing both the command line and kernel version measurement in IMA. > >>>> Can you please elaborate on how this can be used outside of the scenario? > >>>> That will help me come back with a better design and code. I am > >>>> neutral about this. > >>> As I said previously, initially you might want to only measure the > >>> kexec boot command line, but will you ever want to verify or audit log > >>> the boot command line hash? Perhaps LSMs would be interested in the > >>> boot command line. Should this be an LSM hook? > >> From an LSM perspective, is there any interest in the boot command line? > > > > I can imagine an LSM that cares about the command line, > > but I don't have interest in it for any work I have in progress. > > > > Since the kernel command line controls which LSMs to enable, I doubt that > an LSM which cares about the command line can detect that the kernel command > line was tampered when the kernel command line was tampered... As the subject line indicates, this is the kexec boot command line. This wouldn't be any different than the existing kernel_read_file_from_fd() and security_kernel_load_data() calls in kernel/kexec_file.c and  kernel/kexec.c, which provides the LSMs an opportunity to comment on the kexec image and initramfs. Mimi