From 1dd79a0848db240619c1efd97ca8efafeed1a5b1 Mon Sep 17 00:00:00 2001 From: t3sserakt Date: Mon, 22 Nov 2021 19:03:38 +0100 Subject: - fix wrong kernel parameter check. Fix double free of GNUNET_HELPER_SendHandle --- src/testing/testing_api_cmd_netjail_start_testsystem.c | 4 ++-- src/transport/test_communicator_tcp_basic_peer1.conf | 2 +- src/transport/test_transport_api2_tcp_node1.conf | 2 +- src/transport/test_transport_simple_send.sh | 2 +- src/transport/test_transport_simple_send_broadcast.sh | 2 +- src/transport/test_transport_simple_send_string.sh | 2 +- src/transport/test_transport_udp_backchannel.sh | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/testing/testing_api_cmd_netjail_start_testsystem.c b/src/testing/testing_api_cmd_netjail_start_testsystem.c index 5a005fc25..1709a58d2 100644 --- a/src/testing/testing_api_cmd_netjail_start_testsystem.c +++ b/src/testing/testing_api_cmd_netjail_start_testsystem.c @@ -271,8 +271,8 @@ clear_msg (void *cls, int result) struct TestingSystemCount *tbc = cls; GNUNET_assert (NULL != tbc->shandle); - GNUNET_free (tbc->shandle); - tbc->shandle = NULL; + /*GNUNET_free (tbc->shandle); + tbc->shandle = NULL;*/ GNUNET_free (tbc->msg); tbc->msg = NULL; } diff --git a/src/transport/test_communicator_tcp_basic_peer1.conf b/src/transport/test_communicator_tcp_basic_peer1.conf index d9fff8bbb..dbc227ac6 100644 --- a/src/transport/test_communicator_tcp_basic_peer1.conf +++ b/src/transport/test_communicator_tcp_basic_peer1.conf @@ -36,7 +36,7 @@ UNIXPATH = $GNUNET_RUNTIME_DIR/test_gnunet-communicator-unix_1.sock [communicator-tcp] #PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args -PREFIX = valgrind --leak-check=full --track-origins=yes +#PREFIX = valgrind --leak-check=full --track-origins=yes BINDTO = 60002 DISABLE_V6 = YES diff --git a/src/transport/test_transport_api2_tcp_node1.conf b/src/transport/test_transport_api2_tcp_node1.conf index d6932b1b9..e38744949 100644 --- a/src/transport/test_transport_api2_tcp_node1.conf +++ b/src/transport/test_transport_api2_tcp_node1.conf @@ -15,7 +15,7 @@ DISABLE_V6 = YES IMMEDIATE_START = YES UNIXPATH = $GNUNET_RUNTIME_DIR/tcp-comm-p1.sock #PREFIX = valgrind --log-file=/tmp/vg_cpeer1-%p -PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args +#PREFIX = xterm -geometry 100x85 -T peer1 -e gdb --args [communicator-udp] BINARY = gnunet-communicator-udp diff --git a/src/transport/test_transport_simple_send.sh b/src/transport/test_transport_simple_send.sh index e7da65ff7..3d5266622 100755 --- a/src/transport/test_transport_simple_send.sh +++ b/src/transport/test_transport_simple_send.sh @@ -2,7 +2,7 @@ if ! [ -d "/run/netns" ]; then echo You have to create the directory /run/netns. fi -if [ "$(cat /proc/sys/kernel/core_uses_pid)" == 1 ]; then +if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_simple_send_topo.conf" else echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" diff --git a/src/transport/test_transport_simple_send_broadcast.sh b/src/transport/test_transport_simple_send_broadcast.sh index 93572327b..f264b1203 100755 --- a/src/transport/test_transport_simple_send_broadcast.sh +++ b/src/transport/test_transport_simple_send_broadcast.sh @@ -2,7 +2,7 @@ if ! [ -d "/run/netns" ]; then echo You have to create the directory /run/netns. fi -if [ "$(cat /proc/sys/kernel/core_uses_pid)" == 1 ]; then +if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then # exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes --trace-children=yes --trace-children-skip=/usr/bin/awk,/usr/bin/cut,/usr/bin/seq,/sbin/ip/sed/bash ./test_transport_start_with_config test_transport_simple_send_broadcast_topo.conf" exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_simple_send_broadcast_topo.conf" else diff --git a/src/transport/test_transport_simple_send_string.sh b/src/transport/test_transport_simple_send_string.sh index f9510e6b6..b2bd05d5f 100755 --- a/src/transport/test_transport_simple_send_string.sh +++ b/src/transport/test_transport_simple_send_string.sh @@ -11,7 +11,7 @@ EOF if ! [ -d "/run/netns" ]; then echo You have to create the directory /run/netns. fi -if [ "$(cat /proc/sys/kernel/core_uses_pid)" == 1 ]; then +if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config -s '$string'" else echo -e "Error during test setup: The kernel parameter kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n sysctl kernel.unprivileged_userns_clone=1\n" diff --git a/src/transport/test_transport_udp_backchannel.sh b/src/transport/test_transport_udp_backchannel.sh index f93aef7ff..b42186307 100755 --- a/src/transport/test_transport_udp_backchannel.sh +++ b/src/transport/test_transport_udp_backchannel.sh @@ -2,7 +2,7 @@ if ! [ -d "/run/netns" ]; then echo You have to create the directory /run/netns. fi -if [ "$(cat /proc/sys/kernel/core_uses_pid)" == 1 ]; then +if [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" == 1 ]; then #exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes --trace-children=yes --trace-children-skip=/usr/bin/awk,/usr/bin/cut,/usr/bin/seq,/sbin/ip ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" # exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; valgrind --leak-check=full --track-origins=yes ./test_transport_start_with_config test_transport_udp_backchannel_topo.conf" -- cgit v1.2.3