Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753848AbZJYTME (ORCPT ); Sun, 25 Oct 2009 15:12:04 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753609AbZJYTMD (ORCPT ); Sun, 25 Oct 2009 15:12:03 -0400 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 Date: Sun, 25 Oct 2009 07:29:53 +0100 From: Pavel Machek To: kernel list , jack@suse.cz Cc: linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, jamie@shareable.org Subject: symlinks with permissions Message-ID: <20091025062953.GC1391@ucw.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 22 ...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 -- 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/