On Thu, Apr 24, 2008 at 01:29:49PM -0400, Erez Zadok wrote:Doesn't have anything to do with vfsmounts (you have one to deal with and if it's r/o, it's equivalent to just doing the entire thing on top of r/o fs; not interesting). No, what I'm worried about is much simpler. Look: we have a file on underlying fs, owned by root.root with 644 for permissions. Comes a luser and tries to open the counterpart of that file in ecryptfs; that triggers ecryptfs_interpose() and attempts to open file. Of course, that's going to fail - it's not world-writable. So then it (actually ecryptfs_init_persistent_file()) falls back to opening with O_RDONLY. Which succeeds just fine and file (opened r/o) is set as ->lower_file. Now comes root and tries to open the damn thing r/w. It should be able to and if it came first it'd get it; as it is, what it gets is ->lower_file and that puppy is opened read-only and you have no guarantee that underlying fs will not go bonkers seeing write attempts on it (e.g. open for write doing a bit more setup of ->private_data, etc.). --
| Zach Brown | [PATCH 3 of 4] Teach paths to wake a specific void * target instead of a whole tas... |
| Linus Torvalds | Re: LSM conversion to static interface |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Andrew Morton | -mm merge plans for 2.6.23 |
git: | |
| Gregory Haskins | [RFC PATCH 00/17] virtual-bus |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
