diff options
Diffstat (limited to 'tests/shell/testcases/bogons')
-rwxr-xr-x | tests/shell/testcases/bogons/assert_failures | 17 | ||||
-rw-r--r-- | tests/shell/testcases/bogons/nft-f/asan_stack_buffer_overrun_in_netlink_gen_range | 6 |
2 files changed, 22 insertions, 1 deletions
diff --git a/tests/shell/testcases/bogons/assert_failures b/tests/shell/testcases/bogons/assert_failures index 79099427..3dee63b3 100755 --- a/tests/shell/testcases/bogons/assert_failures +++ b/tests/shell/testcases/bogons/assert_failures @@ -1,12 +1,27 @@ #!/bin/bash dir=$(dirname $0)/nft-f/ +tmpfile=$(mktemp) + +cleanup() +{ + rm -f "$tmpfile" +} + +trap cleanup EXIT for f in $dir/*; do - $NFT --check -f "$f" + echo "Check $f" + $NFT --check -f "$f" 2> "$tmpfile" if [ $? -ne 1 ]; then echo "Bogus input file $f did not cause expected error code" 1>&2 exit 111 fi + + if grep AddressSanitizer "$tmpfile"; then + echo "Address sanitizer splat for $f" 1>&2 + cat "$tmpfile" + exit 111 + fi done diff --git a/tests/shell/testcases/bogons/nft-f/asan_stack_buffer_overrun_in_netlink_gen_range b/tests/shell/testcases/bogons/nft-f/asan_stack_buffer_overrun_in_netlink_gen_range new file mode 100644 index 00000000..2f7872e4 --- /dev/null +++ b/tests/shell/testcases/bogons/nft-f/asan_stack_buffer_overrun_in_netlink_gen_range @@ -0,0 +1,6 @@ +table ip test { + chain y { + redirect to :tcp dport map { 83 : 80/3, 84 :4 } + } +} + |