]> 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 08:58:56 +0000 (10:58 +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 2e486b4be02f8981f29f54fd616c03ee949f191a..aa24c8b91b3e0db8710d70a778431217d054c557 100644 (file)
@@ -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
index e8aa65d912b2c521a958b0ffeb92f0b0d2315db7..6fd1293e29e5e0e85d794085515eba22d2b3c9f5 100644 (file)
 ./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