Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp418748pxu; Sun, 22 Nov 2020 13:11:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJziWDDt9VBgXmScedq9AXG6CW9F/Da4giU2M1ntpLA9kBsv3gIV9eZUTWRkVTlku10LHiwo X-Received: by 2002:a17:907:c14:: with SMTP id ga20mr41600685ejc.526.1606079519171; Sun, 22 Nov 2020 13:11:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606079519; cv=none; d=google.com; s=arc-20160816; b=jQkq+VqIbunsz+3BY98C97TKvXjNfN5IJaADRVguBqDs6eLTdbesLvdBX3O73IsS5+ ZVEeUqixe7t3noGu8yvH6zZygBUZYX2m66o3QsFDKKxelEi2KtjY9K2EmSk2uSwwBg7x rnxUv0A2wxhCcFuoyCXGDt2pXmXTtxXCRuspw5owSGMxyQw3ymT2CyPsFuBgurB1UcYe Byihe4riM5cWQYEYvDSz+KmfSI+otgTuAi7PQopDbehIubCXhRLCivxyf1f9AlS/aPcS +rEwD2aOoxhyUXBntDMYO7dHYp+Fl+QZl/qV2FvcywviYALv1zJYooohDBP5TP5mYEeA jNqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-filter; bh=alE6Kb/zDgqzLgdvNjihsk5l+fJjrnYiq4iR3wkQH+k=; b=A832ZCRSlMKfXWQfoLnQ++DINPWpZGwe3AL0S/vLCQ18MfAqxTd/tycRctY8xHUkzC hxqMKJz6pxJVaw1C9BzDCDxi+99EXyte8CSIWI0vNNKN/ZE3nWKPOH4IpB/3j1XwnxiK 9oUrC3jh2ZZrobDZTbPXV6eG1qKfSsZGD8Gzy5higr0rmSBcJhd8z1ArSFuOyesMikVr oR4EndBKNSuyYaCt11eXfPWFQz3qwEa09+hjOmIkeGF5Dhc1A+DRmGPg1qnKQhTLJONH iB2aNF6bqmhs1rY5ZFOxjDUPPwt05QIuylWhFhImcwEHRPDqh2A3yjY03ucJlMo3gyBO RdbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=gGXIdg7o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t23si5876703ejs.429.2020.11.22.13.11.36; Sun, 22 Nov 2020 13:11:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=gGXIdg7o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727635AbgKVUxj (ORCPT + 99 others); Sun, 22 Nov 2020 15:53:39 -0500 Received: from linux.microsoft.com ([13.77.154.182]:49316 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727418AbgKVUxi (ORCPT ); Sun, 22 Nov 2020 15:53:38 -0500 Received: from [192.168.86.31] (c-71-197-163-6.hsd1.wa.comcast.net [71.197.163.6]) by linux.microsoft.com (Postfix) with ESMTPSA id B7AFB20B717A; Sun, 22 Nov 2020 12:53:36 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com B7AFB20B717A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1606078417; bh=alE6Kb/zDgqzLgdvNjihsk5l+fJjrnYiq4iR3wkQH+k=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=gGXIdg7oo3NxBnYLTF6PEbRZvdcXdbnnlLlQ3YfDgE+wvrZM0lYR6WqM4X+tCmiPP EldLucw+lLJagJHWRX5TeaWcO7cM4RDF6UClTg5vO12b7cWO7BvlKuK9EQNMlEbryD Z/IiP2IE9CP5mW6v/DXF7UjLxi4UYMaRHDrEQGhs= Subject: Re: [PATCH v6 0/8] IMA: support for measuring kernel integrity critical data To: Pavel Machek Cc: zohar@linux.ibm.com, stephen.smalley.work@gmail.com, casey@schaufler-ca.com, agk@redhat.com, snitzer@redhat.com, gmazyland@gmail.com, paul@paul-moore.com, tyhicks@linux.microsoft.com, sashal@kernel.org, jmorris@namei.org, nramas@linux.microsoft.com, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com References: <20201119232611.30114-1-tusharsu@linux.microsoft.com> <20201120124657.GA31468@duo.ucw.cz> From: Tushar Sugandhi Message-ID: Date: Sun, 22 Nov 2020 12:53:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201120124657.GA31468@duo.ucw.cz> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Pavel for looking at this series. On 2020-11-20 4:46 a.m., Pavel Machek wrote: > On Thu 2020-11-19 15:26:03, Tushar Sugandhi wrote: >> Kernel integrity critical data can be defined as the in-memory kernel >> data which if accidentally or maliciously altered, can compromise the >> integrity of the system. > > Is that an useful definition? I will rework on the definition in the next iteration. Meanwhile, if you have any feedback on what can we add to the definition, that would help is. > >> There are several kernel subsystems that contain integrity critical >> data - e.g. LSMs like SELinux, or AppArmor; or device-mapper targets >> like dm-crypt, dm-verity etc. Examples of critical data could be kernel >> in-memory r/o structures, hash of the memory structures, or data that >> represents a linux kernel subsystem state. >> >> This patch set defines a new IMA hook namely ima_measure_critical_data() >> to measure the critical data. Kernel subsystems can use this >> functionality, to take advantage of IMA's measuring and quoting >> abilities - thus ultimately enabling remote attestation for the >> subsystem specific information stored in the kernel memory. > > How is it supposed to be useful? > > I'm pretty sure there are critical data that are not measured by > proposed module... and that are written under normal circumstances. > The goal of this series is to introduce the IMA hook measure_critical_data() and the necessary policies to use it; and illustrate that use with one example (SELinux). It is not scalable to identify and update all the critical data sources to use the proposed module at once. A piecemeal approach to add more critical data measurement in subsequent patches would be easy to implement and review. Please let me know if you have more thoughts on this. (what critical data you think would be useful to measure etc.) ~Tushar > Best regards, > > Pavel >