linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix user namespace leak
@ 2021-10-14 16:02 Alexey Gladkov
  2021-10-15 14:43 ` Eric W. Biederman
  0 siblings, 1 reply; 3+ messages in thread
From: Alexey Gladkov @ 2021-10-14 16:02 UTC (permalink / raw)
  To: LKML, Eric W . Biederman, linux-nfs
  Cc: Trond Myklebust, Anna Schumaker, Sargun Dhillon

Fixes: 61ca2c4afd9d ("NFS: Only reference user namespace from nfs4idmap struct instead of cred")
Signed-off-by: Alexey Gladkov <legion@kernel.org>
---
 fs/nfs/nfs4idmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c
index 8d8aba305ecc..f331866dd418 100644
--- a/fs/nfs/nfs4idmap.c
+++ b/fs/nfs/nfs4idmap.c
@@ -487,7 +487,7 @@ nfs_idmap_new(struct nfs_client *clp)
 err_destroy_pipe:
 	rpc_destroy_pipe_data(idmap->idmap_pipe);
 err:
-	get_user_ns(idmap->user_ns);
+	put_user_ns(idmap->user_ns);
 	kfree(idmap);
 	return error;
 }
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix user namespace leak
  2021-10-14 16:02 [PATCH] Fix user namespace leak Alexey Gladkov
@ 2021-10-15 14:43 ` Eric W. Biederman
  2021-10-15 21:19   ` Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Eric W. Biederman @ 2021-10-15 14:43 UTC (permalink / raw)
  To: Alexey Gladkov
  Cc: LKML, linux-nfs, Trond Myklebust, Anna Schumaker, Sargun Dhillon

Alexey Gladkov <legion@kernel.org> writes:

> Fixes: 61ca2c4afd9d ("NFS: Only reference user namespace from nfs4idmap struct instead of cred")
> Signed-off-by: Alexey Gladkov <legion@kernel.org>

Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>

nfs folks do you want to pick this up?

> ---
>  fs/nfs/nfs4idmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c
> index 8d8aba305ecc..f331866dd418 100644
> --- a/fs/nfs/nfs4idmap.c
> +++ b/fs/nfs/nfs4idmap.c
> @@ -487,7 +487,7 @@ nfs_idmap_new(struct nfs_client *clp)
>  err_destroy_pipe:
>  	rpc_destroy_pipe_data(idmap->idmap_pipe);
>  err:
> -	get_user_ns(idmap->user_ns);
> +	put_user_ns(idmap->user_ns);
>  	kfree(idmap);
>  	return error;
>  }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix user namespace leak
  2021-10-15 14:43 ` Eric W. Biederman
@ 2021-10-15 21:19   ` Trond Myklebust
  0 siblings, 0 replies; 3+ messages in thread
From: Trond Myklebust @ 2021-10-15 21:19 UTC (permalink / raw)
  To: legion, ebiederm; +Cc: linux-nfs, sargun, linux-kernel, anna.schumaker

On Fri, 2021-10-15 at 09:43 -0500, Eric W. Biederman wrote:
> Alexey Gladkov <legion@kernel.org> writes:
> 
> > Fixes: 61ca2c4afd9d ("NFS: Only reference user namespace from
> > nfs4idmap struct instead of cred")
> > Signed-off-by: Alexey Gladkov <legion@kernel.org>
> 
> Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
> 
> nfs folks do you want to pick this up?

It is in my testing branch,

> 
> > ---
> >  fs/nfs/nfs4idmap.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c
> > index 8d8aba305ecc..f331866dd418 100644
> > --- a/fs/nfs/nfs4idmap.c
> > +++ b/fs/nfs/nfs4idmap.c
> > @@ -487,7 +487,7 @@ nfs_idmap_new(struct nfs_client *clp)
> >  err_destroy_pipe:
> >         rpc_destroy_pipe_data(idmap->idmap_pipe);
> >  err:
> > -       get_user_ns(idmap->user_ns);
> > +       put_user_ns(idmap->user_ns);
> >         kfree(idmap);
> >         return error;
> >  }

-- 
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-10-15 21:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 16:02 [PATCH] Fix user namespace leak Alexey Gladkov
2021-10-15 14:43 ` Eric W. Biederman
2021-10-15 21:19   ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).