From: Ondřej Surý Date: Tue, 21 Jul 2020 13:56:13 +0000 (+0200) Subject: Add PoC system test for pk11_numbits() assertion X-Git-Tag: v9.16.7~18^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f195c192a6641c3a80217619320e03c6fe278c9b;p=thirdparty%2Fbind9.git Add PoC system test for pk11_numbits() assertion (cherry picked from commit a69433ba406935e7957a72bd16801ba87fdec41b) --- diff --git a/bin/tests/system/pkcs11/2037-pk11_numbits-crash-test.pkt b/bin/tests/system/pkcs11/2037-pk11_numbits-crash-test.pkt new file mode 100644 index 00000000000..77d87f68ed1 --- /dev/null +++ b/bin/tests/system/pkcs11/2037-pk11_numbits-crash-test.pkt @@ -0,0 +1,20 @@ +00000000: 0137 edda 2800 0001 0000 0001 0000 0972 .7..(..........r +00000010: 7361 7368 6132 3536 0765 7861 6d70 6c65 sasha256.example +00000020: 0000 0600 01c0 0c00 3000 0100 0001 2c01 ........0.....,. +00000030: 0801 0003 0803 0100 0100 0000 0000 0000 ................ +00000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +000000a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +000000b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +000000c0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +000000d0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +000000e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +000000f0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00000100: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00000110: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00000120: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +00000130: 0000 0000 0000 0000 00 ......... diff --git a/bin/tests/system/pkcs11/tests.sh b/bin/tests/system/pkcs11/tests.sh index 2e486b4be02..aa24c8b91b3 100644 --- a/bin/tests/system/pkcs11/tests.sh +++ b/bin/tests/system/pkcs11/tests.sh @@ -138,5 +138,10 @@ echo_i "Checking if all supported algorithms were tested" [ "$n" -eq "$(wc -l < supported)" ] || ret=1 test_done +echo_i "Checking for assertion failure in pk11_numbits()" +$PERL ../packet.pl -a "10.53.0.1" -p "$PORT" -t udp 2037-pk11_numbits-crash-test.pkt +dig_with_opts @10.53.0.1 version.bind. CH TXT > dig.out.pk11_numbits || ret=1 +test_done + echo_i "exit status: $status" [ "$status" -eq 0 ] || exit 1 diff --git a/util/copyrights b/util/copyrights index e8aa65d912b..6fd1293e29e 100644 --- a/util/copyrights +++ b/util/copyrights @@ -820,6 +820,7 @@ ./bin/tests/system/pipelined/refb X 2014,2015,2018,2019,2020 ./bin/tests/system/pipelined/setup.sh SH 2014,2015,2016,2017,2018,2019,2020 ./bin/tests/system/pipelined/tests.sh SH 2014,2015,2016,2017,2018,2019,2020 +./bin/tests/system/pkcs11/2037-pk11_numbits-crash-test.pkt X 2020 ./bin/tests/system/pkcs11/clean.sh SH 2010,2012,2014,2016,2017,2018,2019,2020 ./bin/tests/system/pkcs11/setup.sh SH 2010,2012,2013,2014,2016,2017,2018,2019,2020 ./bin/tests/system/pkcs11/tests.sh SH 2010,2012,2014,2016,2017,2018,2019,2020