mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ipcns: fix use after free in free_ipc_ns()
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]>
This commit is contained in:
parent
c03e3126e4
commit
be4d250ab4
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue