Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3249051rdg; Tue, 17 Oct 2023 08:46:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxGG8WGHVk9KCgL6qL2gq5wMyMMlKzwfh4l8Q1mg8t3Fef407UHF/p98ED1KBFhbbCCp2O X-Received: by 2002:a17:902:e88e:b0:1c0:d7a9:1c48 with SMTP id w14-20020a170902e88e00b001c0d7a91c48mr2855529plg.49.1697557605145; Tue, 17 Oct 2023 08:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697557605; cv=none; d=google.com; s=arc-20160816; b=03PvfFgC7iIbCkx3siU2S1ABc2nN+EuwXggxB3u0r1JIHrah7ayRRQW4jUuVoCvhxP 7UQ64lWVFH5qdhDAa7impfZoN5HhRzY46QKJz2WNbjZI5UMx9ep4m5jnwZtQutyNYoet yeBDEovwbHBjgZjHukyJsAeGuqweSsgSMs53Prw7Pjq27+NpYwumdGQwdozKUbPLuYI6 v7q3lVXNFfE6cxoyDWr597k5wYrHKbZcyDmhgAdGf6Cz3FgPxfvqbyA0PytT5l0tZ4wV 2zyACJ1q1P3uo5KMPvyfE3GZVJnR3E5uQ5QAvTZC1PL+tQKFn9wqthHobiks8mxKagjo vZAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=0mrgPXshN0v6qqkRfhdm7z++OcXc8cz4EqlaMatvDL4=; fh=Fa1ZJv3pgmPDwi64qg2xppUSiR+75UeKgpMOFRYTr+A=; b=0m2gdnKkbtJorxT44eZBvk76Z3u08/jautI18rXJ2JIWLaMvAwgNUu8NKfbQkp9Q+E rYJ2dV05v/BUcFDxyWDEeivp5fcOPQaZlASkWOVJ4KEQ+QBrBLLFCBBLercIqoGvI1zp hxRaf8Qp8fez0ES+KQZ/03DmL5USAsgs3Q1sBVVWpJBani9kUCjhrZxsm1/WlEUKtP3h Cls4P9+2+2zTpEtr9Bqv3lzD5xLyTyGdq9POFgPKnvfKPYNzFov+IxScvUHQeP1yqRCT pgPwDW0ZSzyCB7ZgNI8mWuBgTbqapCK7ogpr1MeDKuYgtQl1YYN94B8icrIXoNAFhCid JeEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=Y+7Tt7h+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id mv1-20020a17090b198100b002790e0af4aasi8445041pjb.174.2023.10.17.08.46.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 08:46:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore.com header.s=google header.b=Y+7Tt7h+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=paul-moore.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id A09AC8057471; Tue, 17 Oct 2023 08:46:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344269AbjJQPqW (ORCPT + 99 others); Tue, 17 Oct 2023 11:46:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235209AbjJQPqG (ORCPT ); Tue, 17 Oct 2023 11:46:06 -0400 Received: from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com [IPv6:2607:f8b0:4864:20::1135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B17410A for ; Tue, 17 Oct 2023 08:45:51 -0700 (PDT) Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-5a7ac4c3666so71706697b3.3 for ; Tue, 17 Oct 2023 08:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore.com; s=google; t=1697557551; x=1698162351; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0mrgPXshN0v6qqkRfhdm7z++OcXc8cz4EqlaMatvDL4=; b=Y+7Tt7h+hxvay5+yY0XwfwxvEwvC1rwyUBnqH6sFMgEth05lz/zC9WMXxw7oDNbnMk XJmM9PD8Rq2oDMAT0+73d88mCtMg3S5Z+JjcMw4hrZnh6acmdOdLmjbEmKmVYfiODRLH Uo21Z8o+/DPowcTUs1CeDBkNTfjodR/N1plj1hlL/31d89Zud6oAgbEbsiwTInHqIouT rRM1ZFKXe2Vko+dMlSPVcnZ2N8+gwESESSmCUGksSR8Z3C0cL2TAfM/a12KpT8OQnr+S U5a8KtrzN7hPtbCRaZMwpE7mOZdUqV/Pa8fwJ/ZYAeI8SAfzd17VK1tWCrvFhhjpOqWc orUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697557551; x=1698162351; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0mrgPXshN0v6qqkRfhdm7z++OcXc8cz4EqlaMatvDL4=; b=TGYoC3zOBslIzcAYYPJajHSW/VF28SsYYfAR4RqqYFwoR5X5LcBYiTxU2nV9vSSZBN vmXmdLoLQp25RjjpLRefyT8Tk28sUHw/OulYXc6cvP1htK7L5Pf7mkSKO3gmj8dmO4zO TVHRCHRom4XVZCkr1YhsN7P8SWFGDdsEGIZXqAAHyiSP48nrtmY+O0ZUc0D2gbUkCS2F t8ci5foKk0PRYozf33ucG79upDImmbkuR57Cf1JegiMzqwpLDdfKAPHh206LnsXrmz6f 1bY2hh7TB1kCV7WKLudm1VHn5sewT5HuP5OQ9s5SttMTlJf5A0BsgSMAKGfIyRVSU4DR VIaQ== X-Gm-Message-State: AOJu0YwEsYlO3SrpsjF4aFYNYFuyoayCk6nZOds+kYGFjI2ICrABilRg wfgedGh/CUF1Dc4NqLIn9mm9ktKxwFxmdLyhRQmD X-Received: by 2002:a25:c712:0:b0:d9a:52ee:6080 with SMTP id w18-20020a25c712000000b00d9a52ee6080mr2021464ybe.37.1697557551094; Tue, 17 Oct 2023 08:45:51 -0700 (PDT) MIME-Version: 1.0 References: <932231F5-8050-4436-84B8-D7708DC43845@oracle.com> <7335a4587233626a39ce9bc8a969957d7f43a34c.camel@linux.ibm.com> <1149b6dbfdaabef3e48dc2852cc76aa11a6dd6b0.camel@linux.ibm.com> <4A0505D0-2933-43BD-BEEA-94350BB22AE7@oracle.com> <20230913.Ceifae7ievei@digikod.net> <20230914.shah5al9Kaib@digikod.net> <20231005.dajohf2peiBu@digikod.net> In-Reply-To: From: Paul Moore Date: Tue, 17 Oct 2023 11:45:40 -0400 Message-ID: Subject: Re: RFC: New LSM to control usage of x509 certificates To: Mimi Zohar Cc: =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , Eric Snowberg , "Serge E. Hallyn" , Jarkko Sakkinen , David Howells , David Woodhouse , Kanth Ghatraju , Konrad Wilk , "linux-integrity@vger.kernel.org" , "keyrings@vger.kernel.org" , open list , linux-security-module@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 17 Oct 2023 08:46:42 -0700 (PDT) On Tue, Oct 17, 2023 at 9:48=E2=80=AFAM Mimi Zohar wr= ote: > On Thu, 2023-10-05 at 12:32 +0200, Micka=C3=ABl Sala=C3=BCn wrote: > > > > > A complementary approach would be to create an > > > > > LSM (or a dedicated interface) to tie certificate properties to a= set of > > > > > kernel usages, while still letting users configure these constrai= nts. > > > > > > > > That is an interesting idea. Would the other security maintainers = be in > > > > support of such an approach? Would a LSM be the correct interface? > > > > Some of the recent work I have done with introducing key usage and = CA > > > > enforcement is difficult for a distro to pick up, since these chang= es can be > > > > viewed as a regression. Each end-user has different signing proced= ures > > > > and policies, so making something work for everyone is difficult. = Letting the > > > > user configure these constraints would solve this problem. > > Something definitely needs to be done about controlling the usage of > x509 certificates. My concern is the level of granularity. Would this > be at the LSM hook level or even finer granaularity? You lost me, what do you mean by finer granularity than a LSM-based access control? Can you give an existing example in the Linux kernel of access control granularity that is finer grained than what is provided by the LSMs? --=20 paul-moore.com