Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp955024pxj; Fri, 21 May 2021 03:07:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJGY4c4R2MXJiOXoYCHvmNqj+S61kn55F0KcTv8fVvfEfI8/wpFnm5g0Y49p1U0gacyS7W X-Received: by 2002:aa7:c485:: with SMTP id m5mr10020576edq.230.1621591651230; Fri, 21 May 2021 03:07:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621591651; cv=none; d=google.com; s=arc-20160816; b=pBJlBwA8RpbFn+lj8cnsJK47Ygh5XF+kES7xfeiArrk4JTr4zNLEtBAQUnuME3sSWp VoL6O32LTAdeUEx0dW1dm99PO5aP/aU20v3IuLd6sbbskLM+HWXbTmNANUCufQwT2464 5Q69kHr2lUyUKYlI9cJ0xfaryetqvc9UICXsw78V/2RssZzNZ9b5INW/aU4cTA3+t9LL 5iNRL4Mcac96Aipv+ILQXmi8ANJzRil7cf+MWJAvb2DS3EPCxueUeRO4JBPadBDmyRnD Px2/KopS5p3xCgd1PJK6HGk5wsI2NBxHdjbI2UQPp71gATEo3Vh3leINyjLY26lmkDcv rT/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=/TmnviLGdpWnMyzy2/siX+a3YafURAqqc41E7fcjG/k=; b=EIRz4JoNaWgngvseNbboHrm9MmYWy9Yot8kkUvqO19GuWaKqAz/USwh+sGHwgYxYBt D69tO7LE/ig4D6rmERIZqQyq4aAhaPn2q1F8/2CgnW8UCzByFb/FiKkq4N/mtWsl+0Je EdjCg17UkB8qXpJy4Gtx+1mdKlRA7W2g4+FZTAv8Z8Pu54XXe7S4wZrK3ssVXvEswsNV rtZUc/3NkC9TQLV9MSet9DhAP5LOjHXgVb8cblbgshhN5fbKF939+LJRqVKzTjdusFmM bq4c2bw24snzKlEPdNfFLqnzh/77HSbcoh3XOfdE5v15tit9UyJv5PdAf3M58nprmoyY NVhA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k1si5014648ejp.353.2021.05.21.03.07.07; Fri, 21 May 2021 03:07:31 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235575AbhEUHJF convert rfc822-to-8bit (ORCPT + 99 others); Fri, 21 May 2021 03:09:05 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3092 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235326AbhEUHIv (ORCPT ); Fri, 21 May 2021 03:08:51 -0400 Received: from fraeml712-chm.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4FmcnD1ghMz6842m; Fri, 21 May 2021 14:55:28 +0800 (CST) Received: from fraeml714-chm.china.huawei.com (10.206.15.33) by fraeml712-chm.china.huawei.com (10.206.15.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 21 May 2021 09:07:14 +0200 Received: from fraeml714-chm.china.huawei.com ([10.206.15.33]) by fraeml714-chm.china.huawei.com ([10.206.15.33]) with mapi id 15.01.2176.012; Fri, 21 May 2021 09:07:14 +0200 From: Roberto Sassu To: Mimi Zohar , "mjg59@srcf.ucam.org" CC: "linux-integrity@vger.kernel.org" , "linux-security-module@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v7 00/12] evm: Improve usability of portable signatures Thread-Topic: [PATCH v7 00/12] evm: Improve usability of portable signatures Thread-Index: AQHXSNW+s9pGdic160Kc6WkU36Axf6rsoEOAgADsKvA= Date: Fri, 21 May 2021 07:07:14 +0000 Message-ID: References: <20210514152753.982958-1-roberto.sassu@huawei.com> <2804f10fa77b58b4992f56ea36a36d4f1e3f4b24.camel@linux.ibm.com> In-Reply-To: <2804f10fa77b58b4992f56ea36a36d4f1e3f4b24.camel@linux.ibm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.221.98.153] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Mimi Zohar [mailto:zohar@linux.ibm.com] > Sent: Thursday, May 20, 2021 8:56 PM > On Fri, 2021-05-14 at 17:27 +0200, Roberto Sassu wrote: > > EVM portable signatures are particularly suitable for the protection of > > metadata of immutable files where metadata is signed by a software vendor. > > They can be used for example in conjunction with an IMA policy that > > appraises only executed and memory mapped files. > > > > However, until now portable signatures can be properly installed only if > > the EVM_ALLOW_METADATA_WRITES initialization flag is also set, which > > disables metadata verification until an HMAC key is loaded. This will cause > > metadata writes to be allowed even in the situations where they shouldn't > > (metadata protected by a portable signature is immutable). > > > > The main reason why setting the flag is necessary is that the operations > > necessary to install portable signatures and protected metadata would be > > otherwise denied, despite being legitimate, due to the fact that the > > decision logic has to avoid an unsafe recalculation of the HMAC that would > > make the unsuccessfully verified metadata valid. However, the decision > > logic is too coarse, and does not fully take into account all the possible > > situations where metadata operations could be allowed. > > > > For example, if the HMAC key is not loaded and it cannot be loaded in the > > future due the EVM_SETUP_COMPLETE flag being set, it wouldn't be a > problem > > to allow metadata operations, as they wouldn't result in an HMAC being > > recalculated. > > > > This patch set extends the decision logic and adds the necessary exceptions > > to use portable signatures without turning off metadata verification and > > deprecates the EVM_ALLOW_METADATA_WRITES flag. > > Thanks, Roberto. > > Applied to: git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux- > integrity.git > next-integrity-testing Hi Mimi could you please take the newer version of patch 5/12, which also adds an exception for the INTEGRITY_UNKNOWN error (it occurs when xattrs are not supported)? https://lore.kernel.org/linux-integrity/6d7e059876b64f249b9a01d8b7696e29@huawei.com/T/#m58442ec12e47d9d457bef9b438809a6a132b7512 Thanks Roberto HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Li Peng, Li Jian, Shi Yanli