Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp581389ybi; Fri, 24 May 2019 08:14:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqx+VcxfGcf85bhwc6IhNeTZdoOlDlF5hBDjh1UsU46MM70elOAXZ6XfcrMOa9WK50Njv2bi X-Received: by 2002:a17:902:5acb:: with SMTP id g11mr9909900plm.198.1558710872472; Fri, 24 May 2019 08:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558710872; cv=none; d=google.com; s=arc-20160816; b=uo4KGMROsZriwv3DxI9cXwtXgYf6sh4odMbh69fCl+3Z50cL6P606EYmco+/vS4T2R atXtwby6aK1Gkqo62SgGTXYF/r28vq/4ZR4scI+yBbC64DMJ6PnoPNlhZoprLJ5LRBdm rXrbdrutDquaUJJ4kMLOWs1Ik2k84UeTKuQULf0WqZiFeDWQP7Vmf9svaxpPXVHsSNqg 93T0zSmQjJBm/ikoymfULwrZlvqTWn5mxIb+9GvOnF6fc7GTLyZJKDHTkIoI0kejDDPQ UNo1HI5K4nIJwStFEdknWS/+s0Hyam3yExwrspOvVnRlcHyfoG/wTdl/oSjUGNAqPT0d KQbg== 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=oY4vorhun1JgMFiM3K33F2wr/IevopM1FfinzMVP8q8=; b=Xp4WcFOyuJB0OnUQ42LPlfyNds5q+S305hRKin5a/kej65/Ug0ynVz4QHL8eA9DG1E dTzLMLpobCe6osCxEp0j6G+wU49G/k4/DR14Pt5UzNvLxOALZo+d29e1P9MgZYG75NND l1LnrQGuKgjelQM4Z4NJvik1gI64AjFHVAY36u3KP+twJIfUZ/w24sZ5qtUfZpvOH2v4 TMP8scXY9/IFSr6uJWyXq/gPz0AGuENTKQMfOMsvxJppN/7lniFC4fv8FW6Xs9Kvo1eI NwcXOy2zn/kC8e/NbXdqqcJ3FRIWsuAYdKfzDNw2na4G/jTKSf3Q1MMi9OcUD3Q4r7Y8 zucg== 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 u21si4202718pjx.58.2019.05.24.08.14.15; Fri, 24 May 2019 08:14:32 -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 S2389706AbfEXPMW (ORCPT + 99 others); Fri, 24 May 2019 11:12:22 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60910 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389654AbfEXPMV (ORCPT ); Fri, 24 May 2019 11:12:21 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4OEvxvA061050 for ; Fri, 24 May 2019 11:12:20 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2spjjmhny2-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 24 May 2019 11:12:20 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 24 May 2019 16:12:18 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 24 May 2019 16:12:15 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4OFCEZB40501408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 24 May 2019 15:12:14 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 14B2342049; Fri, 24 May 2019 15:12:14 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1A2464204B; Fri, 24 May 2019 15:12:13 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.111.39]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 24 May 2019 15:12:12 +0000 (GMT) Subject: Re: [PATCH v6 2/3] add a new ima template field buf From: Mimi Zohar To: Prakhar Srivastava , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Cc: mjg59@google.com, roberto.sassu@huawei.com, vgoyal@redhat.com Date: Fri, 24 May 2019 11:12:02 -0400 In-Reply-To: <20190521000645.16227-3-prsriva02@gmail.com> References: <20190521000645.16227-1-prsriva02@gmail.com> <20190521000645.16227-3-prsriva02@gmail.com> 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: 19052415-0016-0000-0000-0000027F1352 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19052415-0017-0000-0000-000032DC108A Message-Id: <1558710722.3977.68.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-24_06:,, 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=967 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905240100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-05-20 at 17:06 -0700, Prakhar Srivastava wrote: > A buffer(cmdline args) measured into ima cannot be appraised > without already being aware of the buffer contents.Since we > don't know what cmdline args will be passed (or need to validate > what was passed) it is not possible to appraise it. > > Since hashs are non reversible the raw buffer is needed to > recompute the hash. > To regenrate the hash of the buffer and appraise the same > the contents of the buffer need to be available. > > A new template field buf is added to the existing ima template > fields, which can be used to store/read the buffer itself. > Two new fields are added to the ima_event_data to carry the > buf and buf_len whenever necessary. > > Updated the process_buffer_measurement call to add the buf > to the ima_event_data. > process_buffer_measurement added in "Add a new ima hook > ima_kexec_cmdline to measure cmdline args" > > - Add a new template field 'buf' to be used to store/read > the buffer data. > - Added two new fields to ima_event_data to hold the buf and > buf_len [Suggested by Roberto] > -Updated process_buffer_meaurement to add the buffer to > ima_event_data This patch description can be written more concisely. Patch 1/3 in this series introduces measuring the kexec boot command line.  This patch defines a new template field for storing the kexec boot command line in the measurement list in order for a remote attestation server to verify. As mentioned, the first patch description should include a shell command for verifying the digest in the kexec boot command line measurement list record against /proc/cmdline.  This patch description should include a shell command showing how to verify the digest based on the new field.  Should the new field in the ascii measurement list be displayed as a string, not hex? Mimi