Re: Upstream first policy

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Monday, March 8, 2010 - 4:37 pm

On Mon, 8 Mar 2010, Rik van Riel wrote:

Umm. No.

/etc/shadow is in no way at all different from /etc/passwd. Both of them 
have pathname-based security issues. The fact that both of them _also_ 
have content-based security issues is an independent issue that I just 
assumed everybody would take for granted.

Clearly I assumed too much.

So I was assuming that everybody realized that the normal inode-based UNIX 
security obviously means that you can only open /etc/passwd read-only as 
any normal user (and not open /etc/shadow at all: but that is in _no_ way 
different from /etc/passwd).

That's an example of non-pathname-based security, where you actually mark 
the content itself restricted some way. It's very naturally done with 
labels on the inode itself. It's what UNIX has _always_ done

Nobody has ever suggested removing that. That would be crazy.

But that thing is _independent_ from the other totally unrelated issue, 
namely the fact that "/etc/passwd" is a special name in the namespace. In 
other words, there is "content security", but then there is also 
"namespace security". 

Of course, you can make /etc unwritable, and that is indeed the 
traditional UNIX model of handling namespace security: by just 
implementing it as "content security" of the directory.

The sgid and sticky bits can be used to further try to make it more 
fine-grained (exactly becuase it is _not_ sufficient to say "you can't 
read or write this directory" on a whole-directory basis), and obviously 
SELinux has extensions of its own too.

Can you really not see the difference between security of naming thigns 
certain things (like "/etc/passwd") - pathname based issues - and the 
separate security of limiting access to any named device - actual markings 
on the inode itself?

				Linus
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Upstream first policy, James Morris, (Sun Mar 7, 2:23 pm)
Re: Upstream first policy, Linus Torvalds, (Sun Mar 7, 2:31 pm)
Re: Upstream first policy, Linus Torvalds, (Sun Mar 7, 2:36 pm)
Re: Upstream first policy, Ingo Molnar, (Mon Mar 8, 2:46 am)
Re: Upstream first policy, Alan Cox, (Mon Mar 8, 10:30 am)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 11:08 am)
Re: Upstream first policy, Al Viro, (Mon Mar 8, 11:45 am)
Re: Upstream first policy, Al Viro, (Mon Mar 8, 11:53 am)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 11:59 am)
Re: Upstream first policy, Alan Cox, (Mon Mar 8, 12:08 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 12:15 pm)
Re: Upstream first policy, Alan Cox, (Mon Mar 8, 12:17 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 12:18 pm)
Re: Upstream first policy, Al Viro, (Mon Mar 8, 12:18 pm)
Re: Upstream first policy, Alan Cox, (Mon Mar 8, 12:27 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 12:32 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 12:34 pm)
Re: Upstream first policy, Ulrich Drepper, (Mon Mar 8, 3:12 pm)
Re: Upstream first policy, Eric W. Biederman, (Mon Mar 8, 4:02 pm)
Re: Upstream first policy, Eric Paris, (Mon Mar 8, 4:12 pm)
Re: Upstream first policy, Rik van Riel, (Mon Mar 8, 4:18 pm)
Re: Upstream first policy, Eric Paris, (Mon Mar 8, 4:18 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 4:21 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 4:37 pm)
Re: Upstream first policy, Rik van Riel, (Mon Mar 8, 4:51 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 5:10 pm)
Re: Upstream first policy, Al Viro, (Mon Mar 8, 5:15 pm)
Re: Upstream first policy, Al Viro, (Mon Mar 8, 5:48 pm)
Re: Upstream first policy, Kyle McMartin, (Mon Mar 8, 5:48 pm)
Re: Upstream first policy, Luca Barbieri, (Mon Mar 8, 6:18 pm)
Re: Upstream first policy, Al Viro, (Mon Mar 8, 6:25 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 6:49 pm)
Re: Upstream first policy, Luca Barbieri, (Mon Mar 8, 6:51 pm)
Re: Upstream first policy, Al Viro, (Mon Mar 8, 6:55 pm)
Re: Upstream first policy, Al Viro, (Mon Mar 8, 7:05 pm)
Re: Upstream first policy, Luca Barbieri, (Mon Mar 8, 7:09 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 7:18 pm)
Re: Upstream first policy, Casey Schaufler, (Mon Mar 8, 8:26 pm)
Re: Upstream first policy, Linus Torvalds, (Mon Mar 8, 8:58 pm)
Re: Upstream first policy, Ingo Molnar, (Tue Mar 9, 12:29 am)
Re: Upstream first policy, Dave Airlie, (Tue Mar 9, 1:46 am)
Re: Upstream first policy, Samir Bellabes, (Tue Mar 9, 6:09 am)
Re: Upstream first policy, Ulrich Drepper, (Tue Mar 9, 7:58 am)
Re: Upstream first policy, Florian Mickler, (Tue Mar 9, 8:16 am)
Re: Upstream first policy, Alan Cox, (Tue Mar 9, 3:49 pm)
Re: Upstream first policy, Eric W. Biederman, (Wed Mar 10, 8:52 pm)
Re: Upstream first policy, Pavel Machek, (Tue Mar 23, 6:59 am)