From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [PATCH v2] vfs: Tighten up linkat(..., AT_EMPTY_PATH) Date: Thu, 22 Aug 2013 12:23:58 -0700 Message-ID: References: <20130822185317.GI31117@1wt.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Willy Tarreau , "security@kernel.org" , Ingo Molnar , Linux Kernel Mailing List , Oleg Nesterov , Al Viro , Linux FS Devel , Brad Spengler To: Andy Lutomirski Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Aug 22, 2013 at 12:05 PM, Andy Lutomirski wrote: > > Does this work for the procfs case? As far as I understand it (which > isn't saying much), it goes through the symlink-following path. Right. The /proc case is still separate, and we really should do something about that too. But again, I don't think I_LINKABLE is the thing to use there either. We probably should tighten up the magic /proc follow-link a lot. > What if we added another field to struct nameidata that's indicates > what restrictions need to be enforced when following magical symlinks > and then enforcing them when nd_jump_link gets used. (There are only > two of these, both in procfs.) Yes, I think that might be just the kind of thing to do. Except some tightening could well be quite regardless of any extra flags. Linus