diff options
author | Hani Benhabiles <kroosec@gmail.com> | 2013-10-11 21:05:34 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-10-11 22:43:55 +0200 |
commit | f3a760cad83a30524ef40d55d18fa1489252c8fb (patch) | |
tree | 649f3672cc3b769964fa452152fa48170c90aeac /src | |
parent | 808a25129605c9e7de9f86fb8d5a5ed3310edd43 (diff) | |
download | conntrack-tools-f3a760cad83a30524ef40d55d18fa1489252c8fb.tar.gz conntrack-tools-f3a760cad83a30524ef40d55d18fa1489252c8fb.zip |
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 <kroosec@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/nfct-extensions/helper.c | 4 |
1 files changed, 0 insertions, 4 deletions
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; } |