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: Sun, 16 Feb 2020 15:12:37 +0100 From: Christian Brauner <christian.brauner@...ntu.com> To: Tycho Andersen <tycho@...ho.ws> Cc: linux-security-module@...r.kernel.org, Kees Cook <keescook@...omium.org>, Jonathan Corbet <corbet@....net>, Alexey Dobriyan <adobriyan@...il.com>, linux-api@...r.kernel.org, containers@...ts.linux-foundation.org, Jann Horn <jannh@...gle.com>, linux-kernel@...r.kernel.org, smbarber@...omium.org, Seth Forshee <seth.forshee@...onical.com>, "Eric W. Biederman" <ebiederm@...ssion.com>, linux-fsdevel@...r.kernel.org, Alexander Viro <viro@...iv.linux.org.uk> Subject: Re: [PATCH v2 19/28] stat: handle fsid mappings On Fri, Feb 14, 2020 at 12:03:14PM -0700, Tycho Andersen wrote: > On Fri, Feb 14, 2020 at 07:35:45PM +0100, Christian Brauner wrote: > > @@ -471,8 +484,13 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf) > > #endif > > tmp.st_mode = stat->mode; > > tmp.st_nlink = stat->nlink; > > - tmp.st_uid = from_kuid_munged(current_user_ns(), stat->uid); > > - tmp.st_gid = from_kgid_munged(current_user_ns(), stat->gid); > > + if (stat->userns_visible) { > > + tmp.st_uid, from_kuid_munged(current_user_ns(), stat->uid); > > + tmp.st_gid, from_kgid_munged(current_user_ns(), stat->gid); > > + } else { > > + tmp.st_uid, from_kfsuid_munged(current_user_ns(), stat->uid); > > + tmp.st_gid, from_kfsgid_munged(current_user_ns(), stat->gid); > > + } > > I suppose this should be = ? Good catch. I thought I had eliminated all those by doing automated conversion but apparently not. :) Christian
Powered by blists - more mailing lists