Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757683AbZJaCaV (ORCPT ); Fri, 30 Oct 2009 22:30:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757653AbZJaCaU (ORCPT ); Fri, 30 Oct 2009 22:30:20 -0400 Received: from mail2.shareable.org ([80.68.89.115]:57912 "EHLO mail2.shareable.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757638AbZJaCaT (ORCPT ); Fri, 30 Oct 2009 22:30:19 -0400 Date: Sat, 31 Oct 2009 02:30:10 +0000 From: Jamie Lokier To: "Eric W. Biederman" Cc: Pavel Machek , Trond Myklebust , Jan Kara , "J. Bruce Fields" , "Serge E. Hallyn" , kernel list , linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk Subject: Re: symlinks with permissions Message-ID: <20091031023010.GB17680@shareable.org> References: <20091025093604.GA1501@ucw.cz> <20091028081653.GA18290@elf.ucw.cz> <20091028210323.GA4159@elf.ucw.cz> <20091029110344.GA1517@ucw.cz> <20091030183559.GF7008@elf.ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1262 Lines: 34 Eric W. Biederman wrote: > Pavel Machek writes: > >> How many linux shell scripts and other applications that use /dev/fd/N > >> or /proc/self/fd/N will you be breaking? > > > > Zero. (Well unless someone is exploiting it in wild). > > There are other differences like different offsets etc that may matter. > > >> Closing a theoretical security hole at the expense of breaking real > >> applications is a show stopper. > > > > I don't plan to remove /proc/*/fd; but I would like it to behave like > > dup(). > > > > (I still hope some security team does work for me :-). Yes, it must not be like dup(), sharing the file pointer, because I'm sure that really will break some programs. Like all the ones using gnulib (formerly libiberty) which use /proc/self/fd/N/path/to/file to implement fake openat(N,"path/to/file"). > I bet you will get a lot more traction and discussion if you write > a basic mostly working version of the patch. I agree, and I'll be happy to review/break it ;-) -- Jamie -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/