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: <aQCbLrYf_KTdxZjU@horms.kernel.org>
Date: Tue, 28 Oct 2025 10:30:06 +0000
From: Simon Horman <horms@...nel.org>
To: Christian Brauner <brauner@...nel.org>
Cc: linux-fsdevel@...r.kernel.org, Josef Bacik <josef@...icpanda.com>,
	Jeff Layton <jlayton@...nel.org>, Jann Horn <jannh@...gle.com>,
	Mike Yuan <me@...dnzj.com>,
	Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>,
	Lennart Poettering <mzxreary@...inter.de>,
	Daan De Meyer <daan.j.demeyer@...il.com>,
	Aleksa Sarai <cyphar@...har.com>,
	Amir Goldstein <amir73il@...il.com>, Tejun Heo <tj@...nel.org>,
	Johannes Weiner <hannes@...xchg.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
	linux-kernel@...r.kernel.org, cgroups@...r.kernel.org,
	bpf@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v3 11/70] ns: add active reference count

On Fri, Oct 24, 2025 at 12:52:40PM +0200, Christian Brauner wrote:

...

> diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c

...

> +void get_cred_namespaces(struct task_struct *tsk)
> +{
> +	ns_ref_active_get(tsk->real_cred->user_ns);

Hi Christian,

real_cred is protected by RCU, but this code doesn't seem to take
that into account. Or, at least Sparse doesn't think so:

.../nsproxy.c:264:9: error: no generic selection for 'struct user_namespace *const [noderef] __rcu user_ns'
.../nsproxy.c:264:9: warning: dereference of noderef expression

> +}
> +
> +void exit_cred_namespaces(struct task_struct *tsk)
> +{
> +	ns_ref_active_put(tsk->real_cred->user_ns);

Likewise here.

> +}
> +
>  int exec_task_namespaces(void)
>  {
>  	struct task_struct *tsk = current;

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ