2007-08-23 09:23:55

by Alexey Dobriyan

[permalink] [raw]
Subject: [PATCH] userns: don't leak root user

Signed-off-by: Alexey Dobriyan <[email protected]>
---

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);
}



2007-08-23 14:48:07

by Cédric Le Goater

[permalink] [raw]
Subject: Re: [PATCH] userns: don't leak root user

Alexey Dobriyan wrote:
> Signed-off-by: Alexey Dobriyan <[email protected]>
> ---
>
> 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.

2007-08-23 16:46:31

by Serge E. Hallyn

[permalink] [raw]
Subject: Re: [PATCH] userns: don't leak root user

Quoting Alexey Dobriyan ([email protected]):
> Signed-off-by: Alexey Dobriyan <[email protected]>

Thanks, Alexey.

Signed-off-by: Serge Hallyn <[email protected]>

> ---
>
> 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);
> }
>