ipcns: fix use after free in free_ipc_ns
PATCH 1/1 ipcns: fix use after free in free_ipc_ns
commit b515498 add 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]>
Cc Andrew Morton <[email protected]>
Cc "Serge E. Hallyn" <[email protected]>
Cc "Eric W. Biederman" <[email protected]>
Cc David Howells <[email protected]>
Cc Daniel Lezcano <[email protected]>
--- ipc/namespace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
ipc/namespace.c +1 -1
@@ -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); }/*
Signature · 1 line
1.7.1