From f3a760cad83a30524ef40d55d18fa1489252c8fb Mon Sep 17 00:00:00 2001 From: Hani Benhabiles Date: Fri, 11 Oct 2013 21:05:34 +0100 Subject: nfct: Fix use-after-free / double-free helper's list and flush commands handlers shouldn't call mnl_socket_close on the passed netlink socket as it is done in the main function after parse_params call. Bug introduced in (3c78a45 nfct: src: consolidate netlink socket creation). Signed-off-by: Hani Benhabiles Signed-off-by: Pablo Neira Ayuso --- src/nfct-extensions/helper.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/nfct-extensions') diff --git a/src/nfct-extensions/helper.c b/src/nfct-extensions/helper.c index 7544ed7..bfb153f 100644 --- a/src/nfct-extensions/helper.c +++ b/src/nfct-extensions/helper.c @@ -144,8 +144,6 @@ static int nfct_cmd_helper_list(struct mnl_socket *nl, int argc, char *argv[]) return -1; } - mnl_socket_close(nl); - return 0; } @@ -397,8 +395,6 @@ nfct_cmd_helper_flush(struct mnl_socket *nl, int argc, char *argv[]) return -1; } - mnl_socket_close(nl); - return 0; } -- cgit v1.2.3