Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3743935pxb; Mon, 1 Feb 2021 03:38:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJz73XWPC20s1YSVs3XyIOX/y8yIcXLKciBs3dECziSpUYoX3dJQtt9pd8rR5jH4kyLKYak0 X-Received: by 2002:a17:906:e09:: with SMTP id l9mr17537257eji.196.1612179526840; Mon, 01 Feb 2021 03:38:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612179526; cv=none; d=google.com; s=arc-20160816; b=x81Ag2dil9mT3kzhB6aIYUmSnIqDFd2M1bqFmXp7IUxGMF/5kynCE3wz/lwxk/PMJc 5a31LTjIaXnGzZHY4ImRYWshiHChyvwLT6tlYk32M6I/T8UfHJIIbjYFbX/l5YxD36DW BQRcfd4eApYYVo0w9C5qO1eFnoKTtYfJrCp3h51yD4/EaoTInuuNbTwJOZ+zVgQrVjOf zaR0aJsZ6za5EGUZkVIsbGMphAp8mOqtyPaV8LFCZHF6kFrKVi5mO3x8/BZMlbrGeE55 2ro4yjvDk5dFF+xnm8YAm7DrcfCTXH/EWd070bP9tkhbmEnHj96dd6Gchh6hfC8Q1gbZ 5N/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :mime-version:subject:cc:to:references:in-reply-to:from:organization :dkim-signature; bh=VTFNHmYMNxGpEuIhBb8TR1rvnZN6QF66geki9lSctnE=; b=L8CEpetL+lRW2kpB5JSrcqUF1OTRTIuQSRTsHHcIaK967UstdAnI33U4HC27yhVpWr LKG6lu7YR5dG2z8V3n8apXTFzYlg5JAYtJqw/YWVDxSiMQ2GGTDgfjBA0y2rRxs02lNK /xw7Drqu5nhyLNm9VPxpbTAoq7zIITuchm5RDg8gi4hqT7XPYHlT0qmEScAOUasEpmSM MrSD9m/VJ1jyNFlms9jbDPxTqZ9b5FbDjdifv3stSEl9eiCZlUy8T2XHcJcYIY1K9/Ui /aos/BsPRXzKpgs0iIp9LhmU3T9+Euc5LH1lfNq8kWpzsOd4/kL0WImQaPnSdxOS37Zi YpCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S8ZeQHhb; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g24si2967415ejf.739.2021.02.01.03.38.22; Mon, 01 Feb 2021 03:38:46 -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=@redhat.com header.s=mimecast20190719 header.b=S8ZeQHhb; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229525AbhBALhh (ORCPT + 99 others); Mon, 1 Feb 2021 06:37:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44304 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbhBALhf (ORCPT ); Mon, 1 Feb 2021 06:37:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612179369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VTFNHmYMNxGpEuIhBb8TR1rvnZN6QF66geki9lSctnE=; b=S8ZeQHhbP5+auBTWeu/+MLlfprMaS3JRFvyZw4SxLNq/KE+3/ajlgBCWWkaKBFojgw995R 832tBaSa+mRumBL4tqSmyupHq9zMusM8te35J3W2TolJjP/UwOsY1cEoBkV419tDUE/zAM YP/5mSkZqX4ZQAPBv8Aki8Bc/BU82Pc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-65b3QYUnN6WdbbNFkB38Fw-1; Mon, 01 Feb 2021 06:36:05 -0500 X-MC-Unique: 65b3QYUnN6WdbbNFkB38Fw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DCE08801817; Mon, 1 Feb 2021 11:36:03 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-115-23.rdu2.redhat.com [10.10.115.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id D25303AE1; Mon, 1 Feb 2021 11:36:01 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <8b9477e150d7c939dc0def3ebb4443efcc83cd85.camel@pengutronix.de> References: <8b9477e150d7c939dc0def3ebb4443efcc83cd85.camel@pengutronix.de> <74830d4f-5a76-8ba8-aad0-0d79f7c01af9@pengutronix.de> <6dc99fd9ffbc5f405c5f64d0802d1399fc6428e4.camel@kernel.org> To: Jan =?us-ascii?Q?=3D=3FISO-8859-1=3FQ=3FL=3DFCbbe=3F=3D?= Cc: dhowells@redhat.com, Mimi Zohar , Jarkko Sakkinen , Ahmad Fatoum , James Bottomley , keyrings@vger.kernel.org, Sumit Garg , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, kernel@pengutronix.de Subject: Re: Migration to trusted keys: sealing user-provided key? MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Mon, 01 Feb 2021 11:36:01 +0000 Message-ID: <4153718.1612179361@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jan L=C3=BCbbe wrote: > ... But at this point, you can still do 'keyctl read' on that key, exposi= ng > the key material to user space. I wonder if it would help to provide a keyctl function to mark a key as bei= ng permanently unreadable - so that it overrides the READ permission bit. Alternatively, you can disable READ and SETATTR permission - but that then prevents you from removing other perms if you want to :-/ David