Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp2056271rwe; Fri, 2 Sep 2022 07:56:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR53NJd2u2MnA37Ms2BT+aKg/4nWls8feNKfYyEcYYrqW8v4mLvVM/VDj4R4yVn6ePmNbOU8 X-Received: by 2002:a17:907:9706:b0:741:64ca:ae10 with SMTP id jg6-20020a170907970600b0074164caae10mr19025225ejc.364.1662130594804; Fri, 02 Sep 2022 07:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662130594; cv=none; d=google.com; s=arc-20160816; b=a3uyBJdMOru8LS7Ootas0qmIb6AJHoV7f+EOo61AsZQz3mrNP7SMb9rPrJej96plxJ rAbSOVwrIbMu2Swxw+uyvpHzt0gt3wc5ydbqMn+g67ULXzbOwNRHeUSA0DRuGl/MPxb8 Ze48jP3PiXtut2N++ZV5o9F00w7if5/slgr9du/Rdzv5Owo3bqJNR95kMhXRGT2cyn7/ Gp2sgukUsCFuLGtqsmuoqRUn3QnR3w+34+psixoznfOw6dU0iGQqjv098KRH9FXNIsHZ lJI6zNwAXAOfFjULnKfIpvVMmMDL5f4R+mCdTd1WvvhrdTpRHKAYEJW62YGUFtYHI8zX FPOg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=rakXyjanqYY+h9JKrY+SM4P2Xeh5oK72C6kq7BbRCrU=; b=ZfqswHnnlgHTjlyyI3mLeGlY9meSUSr0rEzlgSvq2NbUYe8upmydnely9KCOdfvrfE /kY/F4PbhMr9DmEkq1otMlYGqYOybqhKpzvL7RiOQh/RTFUeRQD6qT2QPGVcTUSlxG3o PyzZg95AWLDFAPajwI27f1J6/TUQ6MaEhI1FHNS36OsKnyUEwLFhtxtyGGT7kPmK/Qvw nQkBqFrGwMRWiDO7qX1C+4xRoSH6Zmh2WXDiPyf7LZ4IPBbPFt5PYSWjhGTpEVx6JdL1 vsem7L7aggBTbTKD7TaN6pQ3T5nUH4MTY8ntS2xzeYuvD76HlXh4PyR2a048EAFbzWvY Sz9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@digikod.net header.s=20191114 header.b=EfJsWgTd; 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 a12-20020aa7d90c000000b004480b5da8besi1670533edr.257.2022.09.02.07.56.09; Fri, 02 Sep 2022 07:56:34 -0700 (PDT) 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; dkim=pass header.i=@digikod.net header.s=20191114 header.b=EfJsWgTd; 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 S237145AbiIBOoP (ORCPT + 99 others); Fri, 2 Sep 2022 10:44:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237259AbiIBOnq (ORCPT ); Fri, 2 Sep 2022 10:43:46 -0400 Received: from smtp-42ac.mail.infomaniak.ch (smtp-42ac.mail.infomaniak.ch [IPv6:2001:1600:4:17::42ac]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C1303F1C3 for ; Fri, 2 Sep 2022 07:04:55 -0700 (PDT) Received: from smtp-2-0001.mail.infomaniak.ch (unknown [10.5.36.108]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4MK05G58gxzMprrk; Fri, 2 Sep 2022 16:04:02 +0200 (CEST) Received: from localhost (unknown [23.97.221.149]) by smtp-2-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4MK05G3jFtzlh8lB; Fri, 2 Sep 2022 16:04:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=digikod.net; s=20191114; t=1662127442; bh=DKeH0QBhZBlZkVXCcVJahDvxYW92XszACrnYqFmxnYI=; h=From:To:Cc:Subject:Date:From; b=EfJsWgTdzJFSh17SfLFoir/JpoLnCCHypKF5q5vYRUWLag1uuwBUDqyzwmBKlvKbU 7WhguAmFg22688d5doyLVZAVTCIiZS9O/OvLuSmWVRZ5f5PYkT7e0KieoYF2L2a0Fy Bq6k8krMNSE2EA6IRZLaxMxyARdmWodzwwcqAlHM= From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: Linus Torvalds Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , =?UTF-8?q?G=C3=BCnther=20Noack?= , Konstantin Meskhidze , Paul Moore , Xiu Jianfeng , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, stable@vger.kernel.org Subject: [GIT PULL] Landlock fix for v6.0 Date: Fri, 2 Sep 2022 16:04:00 +0200 Message-Id: <20220902140400.1617323-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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Hi Linus, This change fixes a mis-handling of the LANDLOCK_ACCESS_FS_REFER right when multiple rulesets/domains are stacked. The expected behaviour was that an additional ruleset can only restrict the set of permitted operations, but in this particular case, it was potentially possible to re-gain the LANDLOCK_ACCESS_FS_REFER right. Please pull this Landlock fix for v6.0-rc4 . These changes merged cleanly with your tree, and have been successfully tested in the latest linux-next releases for a week. This should be backported to v5.19 . Regards, Mickaël -- The following changes since commit 3d7cb6b04c3f3115719235cc6866b10326de34cd: Linux 5.19 (2022-07-31 14:03:01 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git tags/landlock-6.0-rc4 for you to fetch changes up to 55e55920bbe3ccf516022c51f5527e7d026b8f1d: landlock: Fix file reparenting without explicit LANDLOCK_ACCESS_FS_REFER (2022-09-02 15:29:08 +0200) ---------------------------------------------------------------- Landlock fix for v6.0-rc4 ---------------------------------------------------------------- Mickaël Salaün (1): landlock: Fix file reparenting without explicit LANDLOCK_ACCESS_FS_REFER security/landlock/fs.c | 48 ++++----- tools/testing/selftests/landlock/fs_test.c | 155 +++++++++++++++++++++++++++-- 2 files changed, 170 insertions(+), 33 deletions(-)