Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4188264pxb; Mon, 21 Feb 2022 14:20:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5izSxVta1pBuCL+UGINHsMuG3PSlp4GiOv8awzKd7DvtKC89e+qKEKUnDbAk2B41B0aFJ X-Received: by 2002:a05:6402:4243:b0:412:32f0:c5a with SMTP id g3-20020a056402424300b0041232f00c5amr23495954edb.266.1645482000855; Mon, 21 Feb 2022 14:20:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645482000; cv=none; d=google.com; s=arc-20160816; b=w1vGa6ZPVcJEDHcwelCHQRQCbu2j7gTzOmeY1F1/vutQ1KnM1S3c5MxUBobuXwZa1U nqY41qEXjsm+mtLE0fFWfhRa6cIzjLuqYaLyX2dULwqpBCxQZpRaW6m0or9LMYok8WgP zvJ6o4hCkfA0moSSuwjhwBNstByu7WJvAGzdnqYwxMcqXn3NczXHpBNKpV0GMJm2ITr/ 8YeRnjHbbY5Q98VERP11OhhdycA5I9YZt2fJUSoWjkWInqYvj5fiP1j6LVeZt8OsbzkO XA6fl+LoATsx6Fg/8sIQZSJrn+vyWK3/cZ/SLKM5piG3J2NoBX47IUG+aGXf2clh6SxP du6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=B1bK20CfRg2zPUteMypvSoaez4T04DM66+ceZvMIsII=; b=aGT2rf8ii4usyZT/o/iLPf4zCa6QryrRuykY1qLjiM2Whm4XRkHEiCv0MtlhBRz5r9 UgbogywCVpMP5dliiqoLwWA71m1phbS3J8paRue31tR2myfmVRantkW6cCe1Q6Wb2Sae 3naImSyWqBpuDUuqMHSXyYSLNe1OaDqinSS2+tcCHlUdMNzT1NzSn7EUpB8d+T2Pk0Ot if5sXHCh7BglMIz84AYXhZ8qewWnmoFx70jh4uhQBexlVk6rFvCdgpNfejiyQPmfMN+O GPqi0lPSxeKoqcwk6OXAHyOhVxUC81cIpxFUS3K4koIG+Cl1NydOdTDEK3kjaAv4hQpI 6ytQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p18si10786487edq.139.2022.02.21.14.19.37; Mon, 21 Feb 2022 14:20:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234573AbiBUVQc (ORCPT + 99 others); Mon, 21 Feb 2022 16:16:32 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234390AbiBUVPs (ORCPT ); Mon, 21 Feb 2022 16:15:48 -0500 Received: from smtp-bc09.mail.infomaniak.ch (smtp-bc09.mail.infomaniak.ch [45.157.188.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E72023BF9 for ; Mon, 21 Feb 2022 13:15:18 -0800 (PST) Received: from smtp-3-0000.mail.infomaniak.ch (unknown [10.4.36.107]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4K2Znx4FH4zMqHRq; Mon, 21 Feb 2022 22:15:17 +0100 (CET) Received: from localhost (unknown [23.97.221.149]) by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4K2Znx2S0HzljTgH; Mon, 21 Feb 2022 22:15:17 +0100 (CET) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: James Morris , "Serge E . Hallyn" Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Al Viro , Jann Horn , Kees Cook , Konstantin Meskhidze , Paul Moore , Shuah Khan , linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= Subject: [PATCH v1 11/11] landlock: Add design choices documentation for filesystem access rights Date: Mon, 21 Feb 2022 22:25:22 +0100 Message-Id: <20220221212522.320243-12-mic@digikod.net> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221212522.320243-1-mic@digikod.net> References: <20220221212522.320243-1-mic@digikod.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mickaël Salaün Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20220221212522.320243-12-mic@digikod.net --- Documentation/security/landlock.rst | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/security/landlock.rst b/Documentation/security/landlock.rst index 3df68cb1d10f..621b2c1ac514 100644 --- a/Documentation/security/landlock.rst +++ b/Documentation/security/landlock.rst @@ -7,7 +7,7 @@ Landlock LSM: kernel documentation ================================== :Author: Mickaël Salaün -:Date: March 2021 +:Date: February 2022 Landlock's goal is to create scoped access-control (i.e. sandboxing). To harden a whole system, this feature should be available to any process, @@ -42,6 +42,21 @@ Guiding principles for safe access controls * Computation related to Landlock operations (e.g. enforcing a ruleset) shall only impact the processes requesting them. +Design choices +============== + +Filesystem access rights +------------------------ + +All access rights are tied to an inode and what can be accessed through it. +Reading the content of a directory doesn't imply to be allowed to read the +content of a listed inode. Indeed, a file name is local to its parent +directory, and an inode can be referenced by multiple file names thanks to +(hard) links. Being able to unlink a file only has a direct impact on the +directory, not the unlinked inode. This is the reason why +`LANDLOCK_ACCESS_FS_REMOVE_FILE` or `LANDLOCK_ACCESS_FS_REFER` are not allowed +to be tied to files but only to directories. + Tests ===== -- 2.35.1