projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c03e312
)
ipcns: fix use after free in free_ipc_ns()
author
Xiaotian Feng
<
[email protected]
>
Fri, 25 Mar 2011 08:57:01 +0000
(
01:57
-0700)
committer
Linus Torvalds
<
[email protected]
>
Sat, 26 Mar 2011 00:45:16 +0000
(17:45 -0700)
commit
b515498
("userns: add a user namespace owner of ipc ns") added a
user namespace owner of ipc ns, but it also introduced a use after free in
free_ipc_ns().
Signed-off-by: Xiaotian Feng <
[email protected]
>
Acked-by: "Serge E. Hallyn" <
[email protected]
>
Acked-by: David Howells <
[email protected]
>
Cc: "Eric W. Biederman" <
[email protected]
>
Cc: Daniel Lezcano <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
ipc/namespace.c
patch
|
blob
|
history
diff --git
a/ipc/namespace.c
b/ipc/namespace.c
index 3c3e5223e7e50f2c376a6a2abc9979bb598a350e..8054c8e5faf1da309ef7b44d9ecebd4000883277 100644
(file)
--- a/
ipc/namespace.c
+++ b/
ipc/namespace.c
@@
-104,7
+104,6
@@
static void free_ipc_ns(struct ipc_namespace *ns)
sem_exit_ns(ns);
msg_exit_ns(ns);
shm_exit_ns(ns);
- kfree(ns);
atomic_dec(&nr_ipc_ns);
/*
@@
-113,6
+112,7
@@
static void free_ipc_ns(struct ipc_namespace *ns)
*/
ipcns_notify(IPCNS_REMOVED);
put_user_ns(ns->user_ns);
+ kfree(ns);
}
/*