From 605405557102c04e740fc3249675cc5154436d11 Mon Sep 17 00:00:00 2001 From: Lorenz <12514511+RincewindsHat@users.noreply.github.com> Date: Tue, 15 Mar 2022 22:00:55 +0100 Subject: check_icmp: buffer offerflow (#1733) * Fix different overflows * Less includes * Add testcases * Remove unused variable * Remove unused and commented includes --- plugins-root/t/check_icmp.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins-root/t') diff --git a/plugins-root/t/check_icmp.t b/plugins-root/t/check_icmp.t index 55edc31b..f6aa6813 100644 --- a/plugins-root/t/check_icmp.t +++ b/plugins-root/t/check_icmp.t @@ -12,7 +12,7 @@ my $allow_sudo = getTestParameter( "NP_ALLOW_SUDO", "no" ); if ($allow_sudo eq "yes" or $> == 0) { - plan tests => 18; + plan tests => 20; } else { plan skip_all => "Need sudo to test check_icmp"; } @@ -89,3 +89,8 @@ $res = NPTest->testCmd( is( $res->return_code, 0, "IPv4 source_ip accepted" ); like( $res->output, $successOutput, "Output OK" ); +$res = NPTest->testCmd( + "$sudo ./check_icmp -H $host_responsive -b 65507" + ); +is( $res->return_code, 0, "Try max paket size" ); +like( $res->output, $successOutput, "Output OK - Didn't overflow" ); -- cgit v1.2.3-74-g34f1