Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1723599ybk; Sat, 16 May 2020 21:52:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxevs7X7xkC9gOH+FvSyGgefcyjypEUzYBPc33UqcCDlEKccDt3VKCbrkTsLL6azUuIbcHu X-Received: by 2002:a17:906:7da:: with SMTP id m26mr10369578ejc.342.1589691146956; Sat, 16 May 2020 21:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589691146; cv=none; d=google.com; s=arc-20160816; b=X6aJSQMcvwv2tCGelGTdBXpMBtXAkOEX7lQxwpMxpt+Jt5ZfJ/MJNHsUnxEJ8qV1ZW EVJwlmBhxkom/QSaGEHoDvY/X+XlP++tC0nXO/L5PGhfSGu6VsgCGr+jEUdeLnEV0nft TrfmkYCSNa97UCXia8tUGueVbYUVpdnhubO9uHbNOSLvDcoH6/PExIhBmpOrFEdbYZKN CnAKynG8w9GTLf9dattCdh+95unyMLr1supJg3cr7O5X1kIokWUIr0a2DC49TLRzUnLc 9aBm28cFSknCclxrBp0qxvEaoQ3GQGQSQdx9Xriuxr8CwDmRnLz5u9DoXTpKgrRK7mDC od9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=pFFu8KBWjKHr2xPeJ5E5Rz+M2xlQxznMuHZsvotSGI8=; b=ZyGoqB/mCCLK8VWOXn1rmmsQU9wqN52BaLEidsdo5dktqMRIPA/0GubCRjgGaaCCAZ 4zeRAMDwk+ow2e+LPJNeybxbDb4X/JKMY68eLKa4C4Gl0yRDKEna1Qykc3qdWgupPlIY rox/IF/GNzqfEyfaqyJhOF7cIVkNq1STJyT2Iowdh2v79bo4Lr68AAm2w1T4RNkdEceD Jv0h6Z6II1eS34moC8hXJpEhbVvnQABRnSjJ8rz1aRlZngltzC+BUADhXVvmvkgWxrZo t5E9VpvCPaXlJS55tNB/y7i07CnrlB635ceyqYpIZzE8COgPlNzHBm+ELq7htuCoW5dC MrnQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si4024972edd.521.2020.05.16.21.52.03; Sat, 16 May 2020 21:52:26 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726964AbgEQErp (ORCPT + 99 others); Sun, 17 May 2020 00:47:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbgEQErp (ORCPT ); Sun, 17 May 2020 00:47:45 -0400 Received: from trent.utfs.org (trent.utfs.org [IPv6:2a03:3680:0:3::67]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FA13C061A0C for ; Sat, 16 May 2020 21:47:45 -0700 (PDT) Received: from localhost (localhost [IPv6:::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by trent.utfs.org (Postfix) with ESMTPS id 5E44E63A89; Sun, 17 May 2020 06:47:38 +0200 (CEST) Date: Sat, 16 May 2020 21:47:38 -0700 (PDT) From: Christian Kujau To: Patrick Donnelly cc: Al Viro , open list , Jeff Layton , xiubli@redhat.com, kchai@redhat.com Subject: Re: file system permissions regression affecting root In-Reply-To: Message-ID: References: <20200513161113.GU23230@ZenIV.linux.org.uk> User-Agent: Alpine 2.22 (DEB 395 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 May 2020, Patrick Donnelly wrote: > However, it seems odd that this depends on the owner of the directory. > i.e. this protection only seems to be enforced if the sticky directory > is owned by root. That's expected? According to the documentation[0] this appears to be intentional: protected_regular: [...] When set to "1" don't allow O_CREAT open on regular files that we don't own in world writable sticky directories, unless they are owned by the owner of the directory. C. [0] https://www.kernel.org/doc/Documentation/sysctl/fs.txt -- BOFH excuse #263: It's stuck in the Web.