* Re: FUSE merging? (2)
[not found] ` <4mwwX-3N9-9@gated-at.bofh.it>
@ 2005-07-04 13:09 ` Bodo Eggert
2005-07-04 13:17 ` Miklos Szeredi
0 siblings, 1 reply; 10+ messages in thread
From: Bodo Eggert @ 2005-07-04 13:09 UTC (permalink / raw)
To: Miklos Szeredi, frankvm, miklos, frankvm, akpm, aia21, arjan,
linux-kernel
Miklos Szeredi <miklos@szeredi.hu> wrote:
> I see your point. But then this is really not a security issue, but
> an "are you sure you want to format C:" style protection for the
> user's own sake. Adding a mount option (checked by the library) for
> this would be fine. E.g. with "mount_nonempty" it would not refuse to
> mount on a non-leaf dir, and README would document, that using this
> option might cause trouble. Otherwise the mount would be refused with
> a reference to the above option.
IMO that should be a generic mount option, not FUSE specific.
Maybe the default could vary for each fs, but I'd vote against that.
--
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: FUSE merging? (2)
2005-07-04 13:09 ` FUSE merging? (2) Bodo Eggert
@ 2005-07-04 13:17 ` Miklos Szeredi
2005-07-04 15:19 ` Ragnar Kjørstad
0 siblings, 1 reply; 10+ messages in thread
From: Miklos Szeredi @ 2005-07-04 13:17 UTC (permalink / raw)
To: 7eggert; +Cc: akpm, aia21, arjan, linux-kernel
> > I see your point. But then this is really not a security issue, but
> > an "are you sure you want to format C:" style protection for the
> > user's own sake. Adding a mount option (checked by the library) for
> > this would be fine. E.g. with "mount_nonempty" it would not refuse to
> > mount on a non-leaf dir, and README would document, that using this
> > option might cause trouble. Otherwise the mount would be refused with
> > a reference to the above option.
>
> IMO that should be a generic mount option, not FUSE specific.
> Maybe the default could vary for each fs, but I'd vote against that.
The option only makes sense with the default being restrictive. But
making that default for all filesystems can't be done, because that
would immediately break thousands of existing installations.
I think this makes some sense for unprivileged mounts, but otherwise
not really. If sysadmin is not careful about where the mounts go,
tough luck on him.
Miklos
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: FUSE merging? (2)
2005-07-04 13:17 ` Miklos Szeredi
@ 2005-07-04 15:19 ` Ragnar Kjørstad
0 siblings, 0 replies; 10+ messages in thread
From: Ragnar Kjørstad @ 2005-07-04 15:19 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: 7eggert, akpm, aia21, arjan, linux-kernel
On Mon, Jul 04, 2005 at 03:17:35PM +0200, Miklos Szeredi wrote:
> > > I see your point. But then this is really not a security issue, but
> > > an "are you sure you want to format C:" style protection for the
> > > user's own sake. Adding a mount option (checked by the library) for
> > > this would be fine. E.g. with "mount_nonempty" it would not refuse to
> > > mount on a non-leaf dir, and README would document, that using this
> > > option might cause trouble. Otherwise the mount would be refused with
> > > a reference to the above option.
> >
> > IMO that should be a generic mount option, not FUSE specific.
> > Maybe the default could vary for each fs, but I'd vote against that.
Why a mount option at all?
Why not just a switch for the mount utility?
> The option only makes sense with the default being restrictive. But
> making that default for all filesystems can't be done, because that
> would immediately break thousands of existing installations.
I think it is acceptable to change this behaviour in a new version of
the mount utility. One could considder ignoring the restriction when
running with "-a" or when running as root - that would reduce or
eliminate the problems with the transition.
However, if this is implemented in mount itself, it is totally
orthogonal to the FUSE merge discussion.
--
Ragnar Kjørstad
Software Engineer
Scali - http://www.scali.com
Scaling the Linux Datacenter
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: FUSE merging? (2)
2005-07-04 10:27 ` Miklos Szeredi
@ 2005-07-04 11:26 ` Frank van Maarseveen
0 siblings, 0 replies; 10+ messages in thread
From: Frank van Maarseveen @ 2005-07-04 11:26 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: frankvm, akpm, aia21, arjan, linux-kernel
On Mon, Jul 04, 2005 at 12:27:13PM +0200, Miklos Szeredi wrote:
> E.g. with "mount_nonempty" it would not refuse to
> mount on a non-leaf dir, and README would document, that using this
> option might cause trouble. Otherwise the mount would be refused with
> a reference to the above option.
that will do.
--
Frank
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: FUSE merging? (2)
2005-07-04 9:59 ` Frank van Maarseveen
@ 2005-07-04 10:27 ` Miklos Szeredi
2005-07-04 11:26 ` Frank van Maarseveen
0 siblings, 1 reply; 10+ messages in thread
From: Miklos Szeredi @ 2005-07-04 10:27 UTC (permalink / raw)
To: frankvm; +Cc: miklos, frankvm, akpm, aia21, arjan, linux-kernel
> "solving it properly" refers to hardening the leaf node constraint
> against circumvention I assume. Suppose there's a script for doing simple
> on-line backups using "find". Now explain to the user why he lost his
> data due to a backup script geting EACCES on a non-leaf FUSE mount.
I see your point. But then this is really not a security issue, but
an "are you sure you want to format C:" style protection for the
user's own sake. Adding a mount option (checked by the library) for
this would be fine. E.g. with "mount_nonempty" it would not refuse to
mount on a non-leaf dir, and README would document, that using this
option might cause trouble. Otherwise the mount would be refused with
a reference to the above option.
Is that what you were thinking?
> > There's a nice solution to this (discussed at length earlier): private
> > namespaces.
>
> I thought that's rejected because a process doesn't automatically get the
> right namespace after rsh into such a machine? And fixing it by adjusting
> the name-space of a process (by whatever means) is not transparent.
Private namespaces in their current form are not really useful. But
that's irrelevant to the current discussion. If somebody needs
private namespaces they will have to add the missing features (Ram Pai
is working on shared subtrees, the biggest chunk).
> > I think we are still confusing these two issues, which are in fact
> > separate.
> >
> > 1) polluting global namespace is bad (find -xdev issue)
> >
> > 2) not ptraceable (or not killable) processes should not be able to
> > access an unprivileged mount
> >
> > For 1) private namespaces are the proper solution. For 2) the
> > fuse_allow_task() in it's current or modified form (to check
> > killability) should be OK.
> >
> > 1) is completely orthogonal to FUSE. 2) is currently provably secure,
> > and doesn't seem cause problems in practice. Do you have a concrete
> > example, where it would cause problems?
>
> See above backup scenario.
The backup problem is a consequence of 1). It has absolutely zero to
do with 2). If the fuse_allow_task() security check didn't exist the
backup script would still not work.
> Issues (1) and (2) are tied together I'm afraid:
>
> When using a private name-space and thus assuming an unrelated process
> needs to do something very special to get that name-space then (2)
> would not be needed at all.
Wrong. It's still needed, because suid/sgid programs can
- run under the private namespace without doing anything special
- run with extra privileges, not possesed by the user executing the
program
> On the other hand, Name-space inheritance by setuid processes suddenly
> becomes an issue: issue (2) is re-appearing but at another place.
I don't think you could change the rules of namespace inheritence,
without causing trouble.
Miklos
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: FUSE merging? (2)
2005-07-04 8:56 ` Miklos Szeredi
@ 2005-07-04 9:59 ` Frank van Maarseveen
2005-07-04 10:27 ` Miklos Szeredi
0 siblings, 1 reply; 10+ messages in thread
From: Frank van Maarseveen @ 2005-07-04 9:59 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: frankvm, akpm, aia21, arjan, linux-kernel
On Mon, Jul 04, 2005 at 10:56:30AM +0200, Miklos Szeredi wrote:
> > It is important because on UNIX, "root" rules on local filesystems.
> > I dont't like the idea of root not being able to run "find -xdev"
> > anymore for administrative tasks, just because something got hidden
> > by accident or just for fun by a user. It's not about malicious
> > users who want to hide data: they can do that in tons of ways.
>
> That's a sort of security by obscurity: if the user is dumb enough he
> cannot do any harm. But I'm not interested in that sort of thing. If
> this issue important, then it should be solved properly, and not just
> by "preventing accidents".
"solving it properly" refers to hardening the leaf node constraint
against circumvention I assume. Suppose there's a script for doing simple
on-line backups using "find". Now explain to the user why he lost his
data due to a backup script geting EACCES on a non-leaf FUSE mount. I
don't think that's acceptable. On the other hand, when the user stored
something _deliberately_ under a mountpoint, circumventing the leaf node
constraint by some trickery then it is clearly his own fault when the data
is lost. Anyway, a leaf node constraint can be hardened against misuse
later on, should it become necessary. Your bind-mount case to circumvent
this restriction is slightly flawed because it requires root interaction.
>
> There's a nice solution to this (discussed at length earlier): private
> namespaces.
I thought that's rejected because a process doesn't automatically get the
right namespace after rsh into such a machine? And fixing it by adjusting
the name-space of a process (by whatever means) is not transparent.
> I think we are still confusing these two issues, which are in fact
> separate.
>
> 1) polluting global namespace is bad (find -xdev issue)
>
> 2) not ptraceable (or not killable) processes should not be able to
> access an unprivileged mount
>
> For 1) private namespaces are the proper solution. For 2) the
> fuse_allow_task() in it's current or modified form (to check
> killability) should be OK.
>
> 1) is completely orthogonal to FUSE. 2) is currently provably secure,
> and doesn't seem cause problems in practice. Do you have a concrete
> example, where it would cause problems?
See above backup scenario.
Issues (1) and (2) are tied together I'm afraid:
When using a private name-space and thus assuming an unrelated process
needs to do something very special to get that name-space then (2)
would not be needed at all.
On the other hand, Name-space inheritance by setuid processes suddenly
becomes an issue: issue (2) is re-appearing but at another place.
--
Frank
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: FUSE merging? (2)
2005-07-03 19:36 ` Frank van Maarseveen
@ 2005-07-04 8:56 ` Miklos Szeredi
2005-07-04 9:59 ` Frank van Maarseveen
0 siblings, 1 reply; 10+ messages in thread
From: Miklos Szeredi @ 2005-07-04 8:56 UTC (permalink / raw)
To: frankvm; +Cc: akpm, aia21, arjan, linux-kernel
> It is important because on UNIX, "root" rules on local filesystems.
> I dont't like the idea of root not being able to run "find -xdev"
> anymore for administrative tasks, just because something got hidden
> by accident or just for fun by a user. It's not about malicious
> users who want to hide data: they can do that in tons of ways.
That's a sort of security by obscurity: if the user is dumb enough he
cannot do any harm. But I'm not interested in that sort of thing. If
this issue important, then it should be solved properly, and not just
by "preventing accidents".
> IMHO The best thing FUSE could do is to make the mount totally
> invisible: don't return EACCES, don't follow the FUSE mount but stay
> on the original tree. I think it's either this or returning EACCES
> plus the leaf node constraint at mount time.
The leaf node constranint doesn't make sense. The hidden mount thing
does, but it has been very flatly rejected by Al Viro.
There's a nice solution to this (discussed at length earlier): private
namespaces.
I think we are still confusing these two issues, which are in fact
separate.
1) polluting global namespace is bad (find -xdev issue)
2) not ptraceable (or not killable) processes should not be able to
access an unprivileged mount
For 1) private namespaces are the proper solution. For 2) the
fuse_allow_task() in it's current or modified form (to check
killability) should be OK.
1) is completely orthogonal to FUSE. 2) is currently provably secure,
and doesn't seem cause problems in practice. Do you have a concrete
example, where it would cause problems?
Miklos
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: FUSE merging? (2)
2005-07-03 15:47 ` Miklos Szeredi
@ 2005-07-03 19:36 ` Frank van Maarseveen
2005-07-04 8:56 ` Miklos Szeredi
0 siblings, 1 reply; 10+ messages in thread
From: Frank van Maarseveen @ 2005-07-03 19:36 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: frankvm, akpm, aia21, arjan, linux-kernel
On Sun, Jul 03, 2005 at 05:47:58PM +0200, Miklos Szeredi wrote:
> > > > But that's not really acceptable (see previous audit case) unless FUSE
> > > > refuses to mount on non-leaf dirs.
> > >
> > > I don't think the audit case is important. It's easy to work around
> > > it manually by the sysadmin, and for the automatic case it doesn't
> > > really matter (as detailed above).
> >
> > Note that the audit case "as user" is less important than the root case. I
> > consider the latter very important and EACCES will break it when FUSE
> > permits mounting on non-leaf dirs.
>
> OK. Can you tell me, why you consider it important? And what's your
> proposal for dealing with it?
It is important because on UNIX, "root" rules on local filesystems.
I dont't like the idea of root not being able to run "find -xdev" anymore
for administrative tasks, just because something got hidden by accident
or just for fun by a user. It's not about malicious users who want to
hide data: they can do that in tons of ways. The simple "find -xdev"
by root should just not be affected unless there is a very good reason
(SELinux or other "hardened" solutions).
IMHO The best thing FUSE could do is to make the mount totally invisible:
don't return EACCES, don't follow the FUSE mount but stay on the original
tree. I think it's either this or returning EACCES plus the leaf node
constraint at mount time.
The name-space variancy introduced by the first option is only minor:
Mounting anything over a tree which is still in use by a process is
much worse because it tends to be disruptive. And that has always been
possible.
[And I would use the kill() equivalence instead of ptrace() because it
is more appropriate. Doing so avoids the risk of accidentally breaking
useful setuid programs - I don't know if that will happen but I don't
see any security issues here.]
--
Frank
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: FUSE merging? (2)
2005-07-03 14:10 ` FUSE merging? (2) Frank van Maarseveen
@ 2005-07-03 15:47 ` Miklos Szeredi
2005-07-03 19:36 ` Frank van Maarseveen
0 siblings, 1 reply; 10+ messages in thread
From: Miklos Szeredi @ 2005-07-03 15:47 UTC (permalink / raw)
To: frankvm; +Cc: akpm, aia21, arjan, linux-kernel
> > > But that's not really acceptable (see previous audit case) unless FUSE
> > > refuses to mount on non-leaf dirs.
> >
> > I don't think the audit case is important. It's easy to work around
> > it manually by the sysadmin, and for the automatic case it doesn't
> > really matter (as detailed above).
>
> Note that the audit case "as user" is less important than the root case. I
> consider the latter very important and EACCES will break it when FUSE
> permits mounting on non-leaf dirs.
OK. Can you tell me, why you consider it important? And what's your
proposal for dealing with it?
Refusing to mount on non-leaf dir is not a solution, since it would
still allow arbitrary hiding.
Miklos
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: FUSE merging? (2)
2005-07-03 13:24 ` Miklos Szeredi
@ 2005-07-03 14:10 ` Frank van Maarseveen
2005-07-03 15:47 ` Miklos Szeredi
0 siblings, 1 reply; 10+ messages in thread
From: Frank van Maarseveen @ 2005-07-03 14:10 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: frankvm, akpm, aia21, arjan, linux-kernel
On Sun, Jul 03, 2005 at 03:24:04PM +0200, Miklos Szeredi wrote:
>
> > But that's not really acceptable (see previous audit case) unless FUSE
> > refuses to mount on non-leaf dirs.
>
> I don't think the audit case is important. It's easy to work around
> it manually by the sysadmin, and for the automatic case it doesn't
> really matter (as detailed above).
Note that the audit case "as user" is less important than the root case. I
consider the latter very important and EACCES will break it when FUSE
permits mounting on non-leaf dirs.
--
Frank
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-07-04 15:20 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <4ly7J-14H-9@gated-at.bofh.it>
[not found] ` <4lRDA-4U-55@gated-at.bofh.it>
[not found] ` <4lSJa-16Z-7@gated-at.bofh.it>
[not found] ` <4m5ZG-2ok-1@gated-at.bofh.it>
[not found] ` <4maPM-5XJ-5@gated-at.bofh.it>
[not found] ` <4mcHV-7no-21@gated-at.bofh.it>
[not found] ` <4mduc-7Zg-1@gated-at.bofh.it>
[not found] ` <4mfcJ-UT-17@gated-at.bofh.it>
[not found] ` <4mitV-3mL-3@gated-at.bofh.it>
[not found] ` <4mv7Q-2Ki-19@gated-at.bofh.it>
[not found] ` <4mwdG-3AP-15@gated-at.bofh.it>
[not found] ` <4mwwX-3N9-9@gated-at.bofh.it>
2005-07-04 13:09 ` FUSE merging? (2) Bodo Eggert
2005-07-04 13:17 ` Miklos Szeredi
2005-07-04 15:19 ` Ragnar Kjørstad
2005-07-01 13:05 FUSE merging? Frank van Maarseveen
2005-07-01 13:21 ` Miklos Szeredi
2005-07-01 15:20 ` Frank van Maarseveen
2005-07-01 17:04 ` Miklos Szeredi
2005-07-01 18:04 ` Frank van Maarseveen
2005-07-02 14:49 ` Miklos Szeredi
2005-07-02 16:00 ` Frank van Maarseveen
2005-07-03 6:16 ` Miklos Szeredi
2005-07-03 11:25 ` Frank van Maarseveen
2005-07-03 13:24 ` Miklos Szeredi
2005-07-03 14:10 ` FUSE merging? (2) Frank van Maarseveen
2005-07-03 15:47 ` Miklos Szeredi
2005-07-03 19:36 ` Frank van Maarseveen
2005-07-04 8:56 ` Miklos Szeredi
2005-07-04 9:59 ` Frank van Maarseveen
2005-07-04 10:27 ` Miklos Szeredi
2005-07-04 11:26 ` Frank van Maarseveen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®