Blob Blame History Raw
From 6a2ff420e12211785683f3674fee968893144696 Mon Sep 17 00:00:00 2001
From: David Vossel <dvossel@redhat.com>
Date: Fri, 17 Jan 2014 11:22:24 -0600
Subject: [PATCH] High: ipcs: Prevent ipc server use after free.

The ipc server registers the bind socket to
the poll loop in order to be alerted to new
connection requests. Upon shutdown, the ipc server
does not remove this poll entry. This patch fixes
this use after free.
---
 lib/ipc_setup.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c
index 3c22e6f..fc3ce5b 100644
--- a/lib/ipc_setup.c
+++ b/lib/ipc_setup.c
@@ -431,6 +431,7 @@ int32_t
 qb_ipcs_us_withdraw(struct qb_ipcs_service * s)
 {
 	qb_util_log(LOG_INFO, "withdrawing server sockets");
+	s->poll_fns.dispatch_del(s->server_sock);
 	shutdown(s->server_sock, SHUT_RDWR);
 	close(s->server_sock);
 	return 0;
-- 
1.8.4.2