Re: [PATCH] Yama: verify inode is symlink to avoid bind mounts

From: Kees Cook
Date: Wed Jul 14 2010 - 02:53:48 EST


On Tue, Jul 13, 2010 at 09:30:48PM -0500, Serge E. Hallyn wrote:
> Quoting Kees Cook (kees.cook@xxxxxxxxxxxxx):
> > The inode_follow_link LSM hook is called in bind mount situations as
> > well as for symlink situations, so we must explicitly check for the
> > inode being a symlink to not reject bind mounts in 1777 directories,
>
> Are you sure about that??
>
> If that's true, you might also expand the comment in
> include/linux/security.h.
>
> > which seems to be a common NFSv4 configuration.

Well, the issue is how the NFSv4 client deals with it. It seems to treat
the mounts from the NFSv4 root as a symlink when the server is using bind
mounts. It's kind of weird:
https://launchpad.net/bugs/604407

--
Kees Cook
Ubuntu Security Team
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/