From: Pavel Machek Subject: symlinks with permissions Date: Sun, 25 Oct 2009 07:29:53 +0100 Message-ID: <20091025062953.GC1391@ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, jamie@shareable.org To: kernel list , jack@suse.cz Return-path: Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:56947 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752339AbZJYTMC (ORCPT ); Sun, 25 Oct 2009 15:12:02 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: ...yes, they do exist, in /proc/self/fd/* . Unfortunately, their permissions are not actually checked during open, resulting in (obscure) security hole: if you have fd open for reading, you can reopen it for write, even through unix permissions would not allow that. Now... I'd like to close the hole. One way would be to actually check symlink permissions on open -- because those symlinks already have correct permissions. But ... then I got lost in vfs. Can someone help? Is there better way? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html