lkml.org 
[lkml]   [2014]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC 2/2] fs,proc: Respect FMODE_WRITE when opening /proc/pid/fd/N
On Tue, Apr 22, 2014 at 8:19 AM, David Herrmann <dh.herrmann@gmail.com> wrote:
> Hi
>
> On Tue, Apr 22, 2014 at 4:31 PM, Pavel Machek <pavel@ucw.cz> wrote:
>> Such as here?
>>
>> http://www.securityfocus.com/archive/1/507386
>
> Thanks, that's the first real example someone mentioned.
>
> Quoted from your link:
>
>> The reopen does check the inode permission, but it does not require
>> you have any reachable path to the file. Someone _might_ use that as
>> a traditional unix security mechanism, but if so it's probably quite rare.
>
> In other words, the bug you describe is that /proc/pid/fd/ allows
> access to objects without a reachable path to the only _real_
> filesystem link. But isn't the same true for openat()?

I don't think so. openat doesn't work on fds for things that aren't
directories.

--Andy


\
 
 \ /
  Last update: 2014-04-23 04:01    [W:0.129 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site