[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111207012318.GR2203@ZenIV.linux.org.uk>
Date: Wed, 7 Dec 2011 01:23:18 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: John Johansen <john.johansen@...onical.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [git pull] apparmor fix for __d_path() misuse
On Tue, Dec 06, 2011 at 05:11:59PM -0800, Linus Torvalds wrote:
> It's
> *some* kind of root, but that's just about all the relevant
> information you'd ever want to know.
Damnit, it may very well be NOT ANY KIND OF ROOT AT ALL. Which is what
I'd been trying to tell you all along. You can race with umount -l.
In that case that thing might have been *INSIDE* your chroot jail.
Anywhere in it.
We raced with umount -l /mnt. And what would be /mnt/1/2/foo/bar/baz
had shown up as /foo/bar/baz. A few cycles earlier or later it could
be /1/2/foo/bar/baz or /bar/baz. And you are not in chroot jail at
all. _That_ is what I have trouble with. Because that sysadmin will
misinterpret it exactly the way you have...
See what I'm talking about? I'm fine with giving the pathname to global
root. It's doing that to *random* just-unmounted vfsmount that is not
a good thing.
And yes, we can avoid returning that struct vfsmount *. Fortunately.
See the posting in another branch of that thread for details.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists