OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] userns: don't leak root user
[PATCH] userns: don't leak root user [message #16121] Thu, 23 August 2007 09:22 Go to next message
Alexey Dobriyan is currently offline  Alexey Dobriyan
Messages: 195
Registered: August 2006
Senior Member
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
---

 kernel/user_namespace.c |    1 +
 1 file changed, 1 insertion(+)

--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -81,6 +81,7 @@ void free_user_ns(struct kref *kref)
 	struct user_namespace *ns;
 
 	ns = container_of(kref, struct user_namespace, kref);
+	free_uid(ns->root_user);
 	kfree(ns);
 }
Re: [PATCH] userns: don't leak root user [message #16127 is a reply to message #16121] Thu, 23 August 2007 14:47 Go to previous messageGo to next message
Cedric Le Goater is currently offline  Cedric Le Goater
Messages: 443
Registered: February 2006
Senior Member
Alexey Dobriyan wrote:
> Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
> ---
> 
>  kernel/user_namespace.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- a/kernel/user_namespace.c
> +++ b/kernel/user_namespace.c
> @@ -81,6 +81,7 @@ void free_user_ns(struct kref *kref)
>  	struct user_namespace *ns;
> 
>  	ns = container_of(kref, struct user_namespace, kref);
> +	free_uid(ns->root_user);
>  	kfree(ns);
>  }

Indeed ... 

Thanks !

C.
Re: [PATCH] userns: don't leak root user [message #16128 is a reply to message #16121] Thu, 23 August 2007 16:46 Go to previous message
serue is currently offline  serue
Messages: 750
Registered: February 2006
Senior Member
Quoting Alexey Dobriyan (adobriyan@sw.ru):
> Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>

Thanks, Alexey.

Signed-off-by: Serge Hallyn <serue@us.ibm.com>

> ---
> 
>  kernel/user_namespace.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- a/kernel/user_namespace.c
> +++ b/kernel/user_namespace.c
> @@ -81,6 +81,7 @@ void free_user_ns(struct kref *kref)
>  	struct user_namespace *ns;
> 
>  	ns = container_of(kref, struct user_namespace, kref);
> +	free_uid(ns->root_user);
>  	kfree(ns);
>  }
>
Previous Topic: [PATCH] Remove unused variables from fs/proc/base.c
Next Topic: [PATCH] sys_getsid/sys_getpgid return wrong id for task from another ns
Goto Forum:
  


Current Time: Fri Sep 12 20:17:53 GMT 2025

Total time taken to generate the page: 0.07842 seconds