diff --git a/docs/CHANGELOG b/docs/CHANGELOG index c918319a..8923c088 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -12,7 +12,7 @@ - add check for empty CIDR (#824 #843) - AF_XDF socket extension (#822 #823) - configure.ac: unify search dirs for pcap and add lib32 (#819) - - double free in tcpedit_dlt_cleanup in tcprewrite (#813 #855) + - CVE-2023-4256 double free in tcprewrite DLT_JUNIPER_ETHER (#813 #851) - dlt_jnpr_ether_cleanup: check config before cleanup (#812 #851) - nanosecond timestamps (#796) - low PPS values run at full speed after several days (#779) @@ -53,15 +53,16 @@ - build failures Debian/kfreebsd (#706) - bus error when building on armhf (#705) - typo fixes (#704) - - heap buffer overflow in tcpreplay (#703) - - double free in Juniper DLT (#702) + - CVE-2022-27418 heap buffer overflow in tcpreplay (#703) + - CVE-2022-27416 double free in Juniper DLT (#702) 01/31/2022 Version 4.4.0 - remove obsolete FORCE_ALIGN support to fix macOS 11 compile (#695) - add a security policy document (#689) + - CVE-2021-45386 CVE-2021-45387 two reachable assertions in add_tree_ipv4() and add_tree_ipv6() (#687 #678) - ability to specify directory of pcap files (#682) - incorrect PPS rate for long-running sessions (#679) - - option --skipbroadcast not working (#677) + - option --skipbroadcast not working (#677 #678) - revert #630 to fix --multiplier issues (#674) - gcc 9.3 compiler warnings (#670) - installed netmap not automatically detected (#669) diff --git a/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c b/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c index 9642a2c2..904709c3 100644 --- a/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c +++ b/src/tcpedit/plugins/dlt_jnpr_ether/jnpr_ether.c @@ -64,9 +64,7 @@ dlt_jnpr_ether_register(tcpeditdlt_t *ctx) plugin = tcpedit_dlt_newplugin(); plugin->provides += PLUGIN_MASK_PROTO + PLUGIN_MASK_SRCADDR + PLUGIN_MASK_DSTADDR; - plugin-> - requires - = 0; + plugin->requires = 0; /* what is our DLT value? */ plugin->dlt = dlt_value; diff --git a/src/tcpedit/plugins/dlt_plugins.c b/src/tcpedit/plugins/dlt_plugins.c index 5c2741c2..70885309 100644 --- a/src/tcpedit/plugins/dlt_plugins.c +++ b/src/tcpedit/plugins/dlt_plugins.c @@ -96,12 +96,6 @@ const char *tcpeditdlt_bit_info[] = {"Missing required Layer 3 protocol.", * Public functions ********************************************************************/ -/* - * Ensure init/cleanup are called only once - * Assume a single tcpedit struct and return the previously allocated context. - */ -static int tcpedit_dlt_is_initialized = 0; - /** * initialize our plugin library. Pass the DLT of the source pcap handle. * Actions: @@ -123,9 +117,6 @@ tcpedit_dlt_init(tcpedit_t *tcpedit, const int srcdlt) assert(tcpedit); assert(srcdlt >= 0); - if (tcpedit_dlt_is_initialized++ > 0) - return tcpedit->dlt_ctx; - ctx = (tcpeditdlt_t *)safe_malloc(sizeof(tcpeditdlt_t)); /* do we need a side buffer for L3 data? */ @@ -454,9 +445,6 @@ tcpedit_dlt_cleanup(tcpeditdlt_t *ctx) { tcpeditdlt_plugin_t *plugin; - if (--tcpedit_dlt_is_initialized <= 0) - return; - assert(ctx); plugin = ctx->plugins;