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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11428.1552659870@warthog.procyon.org.uk>
Date:   Fri, 15 Mar 2019 14:24:30 +0000
From:   David Howells <dhowells@...hat.com>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     dhowells@...hat.com,
        Dominik Brodowski <linux@...inikbrodowski.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
        Johannes Weiner <hannes@...xchg.org>, cgroups@...r.kernel.org,
        fenghua.yu@...el.com, linux-kernel@...r.kernel.org
Subject: Re: fs_context-related oops in mainline

Al Viro <viro@...iv.linux.org.uk> wrote:

> -	if (fc->user_ns)
> -		put_user_ns(fc->user_ns);
> -	fc->user_ns = get_user_ns(netns->user_ns);
> +	if (netns) {
> +		if (fc->user_ns)
> +			put_user_ns(fc->user_ns);
> +		fc->user_ns = get_user_ns(netns->user_ns);
> +	}

This begs the question why is sysfs using the current network namespace's idea
of the user namespace?  Why not just use the one directly from current->cred?

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ