New User, Welcome!     Login

user2

Re: /proc filesystem allows bypassing directory permissions on Linux

On 27.10.2009 14:04, Vincent Zweije wrote:
> On Mon, Oct 26, 2009 at 12:14:36PM -0400, Stephen Harris wrote:
>
> ||  User1 creates file with permissions 0644
> ||                      User2 opens file for read access on file descriptor 4
> ||  User1 chmod's directory to 0700
> ||  User1 chmod's file to 0666
> ||  User1 verifies no hard links to file
> ||                      User2 can not open the file for read or write access
> ||                      User2 can not write to file descriptor 4

Re: /proc filesystem allows bypassing directory permissions on Linux

On Mon, Oct 26, 2009 at 12:14:36PM -0400, Stephen Harris wrote:

||  User1 creates file with permissions 0644
||                      User2 opens file for read access on file descriptor 4
||  User1 chmod's directory to 0700
||  User1 chmod's file to 0666
||  User1 verifies no hard links to file
||                      User2 can not open the file for read or write access
||                      User2 can not write to file descriptor 4
||                      User2 _can_ write to /proc/$$/fd/4

Re: /proc filesystem allows bypassing directory permissions on Linux

||  > After chmodding the directory to 0700, *first*
||  >check the link count, *then* chmod the file to 0666:
||  >
||  >     User1 creates file with permissions 0644
||  >                     User2 opens file for read access on file descriptor 4
||  >     User1 chmod's directory to 0700
||  >     User1 verifies no hard links to file
||
||  Here's a window, during which User2 is able to create a hardlink
||  and that will remain unnoticed by User1. There's no way to perform

Re: /proc filesystem allows bypassing directory permissions on Linux

Pavel wrote his email in a convoluted way, so it's not clear what's going
on.  Here's an attempt to rewrite:

User1 creates file with permissions 0644
                    User2 opens file for read access on file descriptor 4
User1 chmod's directory to 0700
User1 chmod's file to 0666
User1 verifies no hard links to file
                    User2 can not open the file for read or write access
                    User2 can not write to file descriptor 4

Re: /proc filesystem allows bypassing directory permissions on Linux

> 
> > After chmodding the directory to 0700, *first*
> >check the link count, *then* chmod the file to 0666:
> >
> >     User1 creates file with permissions 0644
> >                     User2 opens file for read access on file descriptor 4
> >     User1 chmod's directory to 0700
> >     User1 verifies no hard links to file
> 
> Here's a window, during which User2 is able to create a hardlink and
> that will remain unnoticed by User1. There's no way to perform link

Apache web server 2.2: htpasswd predictable salt weakness

 - The universe of salts for htpasswd is far less than the MD5 algorithm
   provides for -- 29 bits vs. 48, or 0.000191 percent of the range that
   should be used for MD5.
 - Any passwords encrypted by htpasswd within the same second of
   system clock time will have the same salt, e.g.
      $ htpasswd -nbm user1 pass1; htpasswd -nbm user2 pass2; \
        htpasswd -nbm user3 pass2
      user1:$apr1$7jv93/..$2J9qu4mN2zms5O42vw/XE.
      user2:$apr1$7jv93/..$55cRqVaWTSB1YQpeD5uYe0
      user3:$apr1$7jv93/..$55cRqVaWTSB1YQpeD5uYe0
   All three users have the same salt, "7jv93/..", and user2 and user3 

Re: /proc filesystem allows bypassing directory permissions on Linux

Dear Dan,

You wrote:

>>      User1 creates file with permissions 0644
>>                      User2 opens file for read access on file descriptor 4
>>      User1 chmod's directory to 0700
>>      User1 verifies no hard links to file
>
> Here's a window, during which User2 is able to create a hardlink and that will 
> remain unnoticed by User1. There's no way to perform link check and 

Re: /proc filesystem allows bypassing directory permissions on Linux

>>>
>>>> After chmodding the directory to 0700, *first*
>>>> check the link count, *then* chmod the file to 0666:
>>>>
>>>>      User1 creates file with permissions 0644
>>>>                      User2 opens file for read access on file descriptor 4
>>>>      User1 chmod's directory to 0700
>>>>      User1 verifies no hard links to file
>>>
>>> Here's a window, during which User2 is able to create a hardlink and
>>> that will remain unnoticed by User1. There's no way to perform link

Re: /proc filesystem allows bypassing directory permissions on Linux

>>
>>> After chmodding the directory to 0700, *first*
>>> check the link count, *then* chmod the file to 0666:
>>>
>>>      User1 creates file with permissions 0644
>>>                      User2 opens file for read access on file descriptor 4
>>>      User1 chmod's directory to 0700
>>>      User1 verifies no hard links to file
>>
>> Here's a window, during which User2 is able to create a hardlink and
>> that will remain unnoticed by User1. There's no way to perform link



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

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