Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4579246ybl; Mon, 13 Jan 2020 16:28:40 -0800 (PST) X-Google-Smtp-Source: APXvYqw45PBKyzMGMuxOYlhb6TE8ZFUwoJnGY706XZ+SjjV1qcve2pyqPf2E8jX1jGCy6XqYsyzG X-Received: by 2002:aca:2207:: with SMTP id b7mr15153355oic.109.1578961720701; Mon, 13 Jan 2020 16:28:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578961720; cv=none; d=google.com; s=arc-20160816; b=qEJhTEXSQ6AjS2Ma+ExhcCm9Hz0JDZOhtLu2P8xgSrFxPsOmZKC9wBBntBw7llKXtC h+580ltkv3X5dt6l5R0wsMYY7nEPwOpZWqKh+23/KjSoeeHJMiBX6qPRg1TMceTpBqx5 YdhVpWMkdcKu5q6EuLgKO+dulRiD2QX8Nd4g3aImQ4pNwK8XRzP3z8LSxAa0MIsikLXL oPw485UA0wwi4Wi/MgmE602F7HqIDpf9jcUxRoDdpTVKtlyBQTgRwl1OP8NXqeEwkq4O lf+zEbwJWQNWzZkqaiXHzOhk2cS4AU0kBi8sN6dB0pMG1umDTHIthLx4AOgpvXRYMB4Y kjWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:dkim-signature; bh=XFMTDBtfZHyOed7ZfNLbmx3RNw8tsdJDO4d09AfyreM=; b=ECQbMFqew5cdzzHnsw4D5sgClUh87BoPaynzQ9wPMWcJN2U/u61a0Ri2ypOhatL7VZ mok2l/+oqaE4OrhHgJUz3FaBaXwKVeSLS1/b0gRZAv9QzXHxQkt5s4LmpgAS6qdqb37Y itA50v9n9dReR7XhxnlP5dLhdt8g34XgWyQkF2XyDksnwIvusboiV6wGTFG3Ra2Jjyvr nH/4loZWRsfk9V8ypI/JrMn9HtURHWPgEbii7Pi8Fn+YRcRrfATciY+pMyruw3I+nqVD QLwtWnPadebiP5K8rgBsgCIJ4AGCQrNQE7cGfC6UIsTLY53iUIMW7bkzM/feM5wLwBYT gCYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@themaw.net header.s=fm2 header.b=I2KNDFPf; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=FvAfXkVh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a9si6835766oib.59.2020.01.13.16.28.28; Mon, 13 Jan 2020 16:28:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@themaw.net header.s=fm2 header.b=I2KNDFPf; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=FvAfXkVh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729126AbgANAZa (ORCPT + 99 others); Mon, 13 Jan 2020 19:25:30 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:34495 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726536AbgANAZ3 (ORCPT ); Mon, 13 Jan 2020 19:25:29 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 7F7657699; Mon, 13 Jan 2020 19:25:28 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 13 Jan 2020 19:25:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; s=fm2; bh= XFMTDBtfZHyOed7ZfNLbmx3RNw8tsdJDO4d09AfyreM=; b=I2KNDFPfO4++5woh Cv9+FYDbg0wzwLTavX3kLx+EHn8Q18NuIs+jqQWuarjw1NE+Zr5ih3Aqffp5KVvZ kDOiTi6mlgNgi2nc9al6pJgd+oLGc0vkHEREjILC+Va3hddW/B98Mg4b9DqBXQGZ ashy5rq75a3k85pz3ZxNirx/Sih4BWJhq8ck4j+LeFyHum/4jHodx2gXZdTJHyyF DYBJMTKR4x0Jz5WY3jCeiDSEmRMGh0KK3Ji3CGXQ8s0RYEV6KPX4FYMMre05AAqi D6Y5h5R7wxUt1oztN99McV+kgUrg82l+XrLd+0TaAvk2j1KL4ahYlpGewQQsrTJ9 hdix3w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=XFMTDBtfZHyOed7ZfNLbmx3RNw8tsdJDO4d09Afyr eM=; b=FvAfXkVhBHwCnEjEnIhffwPCShG13/kCORFDhQUOK8FfZVCXc3t4co4rU kwFyOB7c3TSO347gZaoWx6HiCp/hSHVnGtixPTiM75Cv3RHuC5R4uYXOZHl1+cqX oaAEF/1RWSCvuXqnM7JkyubPOrN5vDHeDo2sDzfFvFH3yX1LylQLMIemTnvofyW5 khaaXwkhBL3U9BE4tL60xIJXYCTojno+VysAQ90vHEAYNcH8/cgVQNXTuUjpKMd6 M9Ukdh4ZTi6+6lXUrBw04KyMavKgBOYNfN6Ii+QHcetTfv6xjbW0E84eisU4euOt FHIjykuHyaccKrUitVlB1qjxwIyrQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvdejuddgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkffuhffvffgjfhgtfggggfesthejredttderjeenucfhrhhomhepkfgrnhcu mfgvnhhtuceorhgrvhgvnhesthhhvghmrgifrdhnvghtqeenucfkphepuddukedrvddtle drudejhedrvdehnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrrghvvghnsehthhgvmhgr fidrnhgvthenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from mickey.themaw.net (unknown [118.209.175.25]) by mail.messagingengine.com (Postfix) with ESMTPA id B008E30607B4; Mon, 13 Jan 2020 19:25:22 -0500 (EST) Message-ID: <19fa114ef619057c0d14dc1a587d0ae9ad67dc6d.camel@themaw.net> Subject: Re: [PATCH RFC 0/1] mount: universally disallow mounting over symlinks From: Ian Kent To: Al Viro Cc: Linus Torvalds , Aleksa Sarai , David Howells , Eric Biederman , stable , Christian Brauner , Serge Hallyn , dev@opencontainers.org, Linux Containers , Linux API , linux-fsdevel , Linux Kernel Mailing List Date: Tue, 14 Jan 2020 08:25:19 +0800 In-Reply-To: <800d36a0dccd43f1b61cab6332a6252ab9aab73c.camel@themaw.net> References: <20200101144407.ugjwzk7zxrucaa6a@yavin.dot.cyphar.com> <20200101234009.GB8904@ZenIV.linux.org.uk> <20200102035920.dsycgxnb6ba2jhz2@yavin.dot.cyphar.com> <20200103014901.GC8904@ZenIV.linux.org.uk> <20200108031314.GE8904@ZenIV.linux.org.uk> <20200108213444.GF8904@ZenIV.linux.org.uk> <20200110041523.GK8904@ZenIV.linux.org.uk> <979cf680b0fbdce515293a3449d564690cde6a3f.camel@themaw.net> <20200112213352.GP8904@ZenIV.linux.org.uk> <800d36a0dccd43f1b61cab6332a6252ab9aab73c.camel@themaw.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.5 (3.32.5-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-01-13 at 10:59 +0800, Ian Kent wrote: > > > 3) is _anything_ besides root directory ever created in direct > > autofs > > superblocks by anyone? If not, why does autofs_lookup() even > > bother > > to > > do anything there? IOW, why not have it return ERR_PTR(-ENOENT) > > immediately > > for direct ones? Or am I missing something and it is, in fact, > > possible > > to have the daemon create something in those? > > Short answer is no, longer answer is directories "shouldn't" ever > be created inside direct mount points. > > The thing is that the multi-mount map construct can be used with > direct mounts too, but they must always have a real mount at the > base because they are direct mounts. So processes should not be > able to walk into them while they are being mounted (constructed). > > But I'm pretty sure it's rare (maybe not done at all) that this > map construct is used with direct mounts. This isn't right. There's actually nothing stopping a user from using a direct map entry that's a multi-mount without an actual mount at its root. So there could be directories created under these, it's just not usually done. I'm pretty sure I don't check and disallow this. Ian