New User, Welcome!     Login

Re: /proc filesystem allows bypassing directory permissions on

From: Pavel Machek <pavel ucw cz>
To: mrex sap com
Cc: marco osp nl, bugtraq securityfocus com
Subject: Re: /proc filesystem allows bypassing directory permissions on
Date: Thu - Oct 29, 2009 01:46 PM


Hi!

> There are two conceivable approaches to implementing the open() for
> a filedescriptor shown in /proc.  Either go throuh the inode and
> check the access permissions on the file at the current time
> (which is a sensible implementation and what the kernel seems
> to be currently doing), or implement it as a dup() and transfer
> of the filedescriptor.  (Tranfering open filedescriptors between
> processes can also be done by IPC).  Implemetenting it via dup()
> would probably keep the original filedescriptor attributes
> (such as read-only) but would require an entirely seperate
> approach to access control (who is allowed to dup() that filedescriptor),
> and it would create problems:  like you would not be able to look
> into files that were opened only for write through /proc, which
> would seriously impair the usefulness of the fd-listing in /proc.

Doing it as dup() is indeed the way to go. /proc/*/fd/ already needs
same uid, so...

                                                                Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html




Copyright © 1995-2012 LinuxRocket.net. All rights reserved.

Nearly all of LinuxRocket's features are free. Be kind and donate to the cause!