]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add test for assertion failure in pk11_numbits
authorMatthijs Mekking <matthijs@isc.org>
Tue, 18 Jan 2022 08:36:59 +0000 (09:36 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Fri, 4 Feb 2022 12:40:18 +0000 (13:40 +0100)
This test was originally in the pkcs11 system test. While this crash
happened in the native pkcs11 of BIND 9, and that code has been
removed in 9.17, there is no need for this test. Nevertheless, it
doesn't hurt having the test case persist.

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

diff --git a/bin/tests/system/engine_pkcs11/2037-pk11_numbits-crash-test.pkt b/bin/tests/system/engine_pkcs11/2037-pk11_numbits-crash-test.pkt
new file mode 100644 (file)
index 0000000..b9c5a32
--- /dev/null
@@ -0,0 +1,30 @@
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# SPDX-License-Identifier: MPL-2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, you can obtain one at https://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+edda 2800 0001 0000 0001 0000 0972 7361
+7368 6132 3536 0765 7861 6d70 6c65 0000
+0600 01c0 0c00 3000 0100 0001 2c01 0801
+0003 0803 0100 0100 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 0000 0000 0000 0000 0000
+0000 0000 0000 00
index b97c60b69f990cd5e3528165e4c447e0922d699a..256ae2eef358c3be7230afe0cca2f4e4fc192ee6 100644 (file)
@@ -162,7 +162,13 @@ done
 # Go back to main test dir.
 cd ..
 
-# TODO: Checking for assertion failure in pk11_numbits
+n=$((n+1))
+ret=0
+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 "$ret" -eq 0 || echo_i "failed"
+status=$((status+ret))
 
 echo_i "exit status: $status"
 [ $status -eq 0 ] || exit 1