login
Header Space

 
 

Re: [AppArmor 19/45] Add struct vfsmount parameters to vfs_rename()

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Al Viro <viro@...>, John Johansen <jjohansen@...>, <akpm@...>, <linux-kernel@...>, <linux-security-module@...>, Tony Jones <tonyj@...>, Andreas Gruenbacher <agruen@...>
Date: Friday, November 2, 2007 - 6:14 am

Al Viro <viro@ftp.linux.org.uk> wrote:


I doubt anybody uses bind mounts & co instead of symlinks in order to
prevent rename() while still allowing to move files by either copying
or by using the source file in the bound directory. At least I expected
bind mounted directories to behave like symlinked ones, minus the problems
of symlinks. 

Since this feature only protects you from rename(src/foo,dst/foo) if
1) There is no way to access src and dst in the same mount space
2) src and dst are writebale by the attacker
3) Unlinking src/foo is OK
4) Renaming src/foo is OK as long as it's within the same mount as foo
5) Symlinking src/foo to dst/foo is OK
6) Creating dst/foo having a different owner is OK
7) Having dst/foo with the original content and owner from src/foo is _not_ OK
8) Moon crashes on earth
, I'd rather like to have a fast mv.


Security checks as in "we built a steel door into that Chinese paper wall"?

As far as I understand, the restriction would not be removed by the LSM
explicitely allowing it, but by the fixed vfs then being able to handle
cross-mountpoint-renames. Maybe yo'll want to keep the ability for the users
who use bind mounts in order to not allow rename() ... both of them.-)

/me prepares for the impact of a large round object on earth.

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

Messages in current thread:
Re: [AppArmor 19/45] Add struct vfsmount parameters to vfs_r..., Bodo Eggert, (Fri Nov 2, 6:14 am)
speck-geostationary