Prev: (none)
Next: Add Dell Business Class Netbook LED driver
From: Christoph Hellwig on 11 Feb 2010 12:30 On Wed, Feb 10, 2010 at 12:15:53PM +0100, Miklos Szeredi wrote: > - renamed flag to UMOUNT_NOFOLLOW > - added UMOUNT_UNUSED for feature detection Umm, why? MNT_ certainly isn't the best naming for unmount flags, but switching convention after we had a few doesn't make any sense. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Miklos Szeredi on 11 Feb 2010 13:10 On Thu, 11 Feb 2010, Christoph Hellwig wrote: > On Wed, Feb 10, 2010 at 12:15:53PM +0100, Miklos Szeredi wrote: > > - renamed flag to UMOUNT_NOFOLLOW > > - added UMOUNT_UNUSED for feature detection > > Umm, why? MNT_ certainly isn't the best naming for unmount flags, > but switching convention after we had a few doesn't make any sense. It's not just bad naming, having another set of unrelated flags with the same prefix *and* in close proximity to each other is asking for trouble. We could rename all the umount flags, and leave userspace do #defines for backward compat. It's not as if this was some widely used or portable API. Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Al Viro on 20 Feb 2010 21:10 On Thu, Feb 11, 2010 at 12:21:00PM -0500, Christoph Hellwig wrote: > On Wed, Feb 10, 2010 at 12:15:53PM +0100, Miklos Szeredi wrote: > > - renamed flag to UMOUNT_NOFOLLOW > > - added UMOUNT_UNUSED for feature detection > > Umm, why? MNT_ certainly isn't the best naming for unmount flags, > but switching convention after we had a few doesn't make any sense. Actually, I've got more interesting question: what's being attempted there? Is that just a "let's protect ourselves against somebody feeding us an untrusted symlink"? I'm not sure if it makes much sense; if we are dealing with pathnames on untrusted fs, there's nothing to stop the attacker from having /mnt/foo/dir (originally containing a mountpoint at /mnt/foo/dir/usr) killed and replaced with a symlink to /, making any code that does umount() on such pathnames vulnerable as hell anyway. Lack of LOOKUP_FOLLOW affects only the last pathname component. So what is that patch trying to make safe? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Miklos Szeredi on 22 Feb 2010 15:40 On Sun, 21 Feb 2010, Al Viro wrote: > On Thu, Feb 11, 2010 at 12:21:00PM -0500, Christoph Hellwig wrote: > > On Wed, Feb 10, 2010 at 12:15:53PM +0100, Miklos Szeredi wrote: > > > - renamed flag to UMOUNT_NOFOLLOW > > > - added UMOUNT_UNUSED for feature detection > > > > Umm, why? MNT_ certainly isn't the best naming for unmount flags, > > but switching convention after we had a few doesn't make any sense. > > Actually, I've got more interesting question: what's being attempted > there? Is that just a "let's protect ourselves against somebody feeding > us an untrusted symlink"? I'm not sure if it makes much sense; if we > are dealing with pathnames on untrusted fs, there's nothing to stop the > attacker from having /mnt/foo/dir (originally containing a mountpoint > at /mnt/foo/dir/usr) killed and replaced with a symlink to /, making any > code that does umount() on such pathnames vulnerable as hell anyway. It is trivial to check the path up to the mountpoint (chdir + getcwd). But doing that on the mountpoint will make it busy, so NOFOLLOW is really needed there. Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: (none) Next: Add Dell Business Class Netbook LED driver |