]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add PoC system test for pk11_numbits() assertion
authorOndřej Surý <ondrej@sury.org>
Tue, 21 Jul 2020 13:56:13 +0000 (15:56 +0200)
committerOndřej Surý <ondrej@isc.org>
Mon, 31 Aug 2020 09:49:36 +0000 (11:49 +0200)
(cherry picked from commit a69433ba406935e7957a72bd16801ba87fdec41b)

bin/tests/system/pkcs11/2037-pk11_numbits-crash-test.pkt [new file with mode: 0644]
bin/tests/system/pkcs11/tests.sh
util/copyrights

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 (file)
index 0000000..77d87f6
--- /dev/null
@@ -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                   .........
index d1007a6bfa7aa538fb553f20971a65685766dc8a..b68be3c33e4f0a0798d9ac469d49d8caf1e9cf3d 100644 (file)
@@ -83,5 +83,12 @@ END
     status=`expr $status + $count`
 done
 
-echo "I:exit status: $status"
-[ $status -eq 0 ] || exit 1
+echo_i "Checking for assertion failure in pk11_numbits()"
+ret=0
+$PERL ../packet.pl -a "10.53.0.1" -p "$PORT" -t udp 2037-pk11_numbits-crash-test.pkt || ret=1
+$DIG $DIGOPTS @10.53.0.1 version.bind. CH TXT > dig.out.pk11_numbits || ret=1
+if [ $ret -ne 0 ]; then echo_i "failed"; fi
+status=$((status+ret))
+
+echo_i "exit status: $status"
+[ "$status" -eq 0 ] || exit 1
index d3e331ede5b018615022d7e5f1b85ed3855c581a..2b8e1d481e2c7fbec6d144715cb8d63155028153 100644 (file)
 ./bin/tests/system/pipelined/refb              X       2014,2015,2018,2019,2020
 ./bin/tests/system/pipelined/setup.sh          SH      2014,2015,2016,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/ns1/example.db.in    ZONE    2010,2016,2018,2019,2020
 ./bin/tests/system/pkcs11/ns1/named.conf       CONF-C  2018,2019,2020