lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 4 Feb 2019 05:04:40 +0100 From: Jann Horn <jannh@...gle.com> To: Alexander Viro <viro@...iv.linux.org.uk>, Jann Horn <jannh@...gle.com> Cc: Andy Lutomirski <luto@...nel.org>, kernel list <linux-kernel@...r.kernel.org>, linux-fsdevel@...r.kernel.org Subject: Re: [PATCH] fs: add a comment explaining how MNT_NS_INTERNAL affects mnt_may_suid() On Wed, Nov 21, 2018 at 8:59 PM Jann Horn <jannh@...gle.com> wrote: > commit 380cf5ba6b0a ("fs: Treat foreign mounts as nosuid"), in addition to > the intended effect, also prevented suid execution of memfd files. > (And I think that's a good change.) Ping. Al, can you take this into your tree? fs/namespace.c is your stuff, right? > Signed-off-by: Jann Horn <jannh@...gle.com> > --- > fs/namespace.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/namespace.c b/fs/namespace.c > index a7f91265ea67..e68488426e42 100644 > --- a/fs/namespace.c > +++ b/fs/namespace.c > @@ -3400,6 +3400,9 @@ bool mnt_may_suid(struct vfsmount *mnt) > * prevents namespaces from trusting potentially unsafe > * suid/sgid bits, file caps, or security labels that originate > * in other namespaces. > + * > + * check_mnt() rejects MNT_NS_INTERNAL mounts; this means that suid > + * execution is blocked for files on internal mounts, e.g. memfds. > */ > return !(mnt->mnt_flags & MNT_NOSUID) && check_mnt(real_mount(mnt)) && > current_in_userns(mnt->mnt_sb->s_user_ns); > -- > 2.20.0.rc0.387.gc7a69e6b6c-goog >
Powered by blists - more mailing lists