From a49b2a3568a3cc4c5396add46ea35700ef87058e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 17 Jun 2024 17:00:36 +1000 Subject: [PATCH] Check invalid alpn produced due to missing double escapes --- .../system/checkzone/zones/bad-svcb-alpn1.db | 17 +++++++++++++++++ .../system/checkzone/zones/bad-svcb-alpn2.db | 17 +++++++++++++++++ .../system/checkzone/zones/bad-svcb-alpn3.db | 17 +++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 bin/tests/system/checkzone/zones/bad-svcb-alpn1.db create mode 100644 bin/tests/system/checkzone/zones/bad-svcb-alpn2.db create mode 100644 bin/tests/system/checkzone/zones/bad-svcb-alpn3.db diff --git a/bin/tests/system/checkzone/zones/bad-svcb-alpn1.db b/bin/tests/system/checkzone/zones/bad-svcb-alpn1.db new file mode 100644 index 0000000000..dcbe0d19e2 --- /dev/null +++ b/bin/tests/system/checkzone/zones/bad-svcb-alpn1.db @@ -0,0 +1,17 @@ +; 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. + +$TTL 600 +@ SOA ns hostmaster 2011012708 3600 1200 604800 1200 + NS ns +ns A 192.0.2.1 +; invalid zero length alpn (at start) due to missing double escape +svcb SVCB 1 . alpn=\,abc diff --git a/bin/tests/system/checkzone/zones/bad-svcb-alpn2.db b/bin/tests/system/checkzone/zones/bad-svcb-alpn2.db new file mode 100644 index 0000000000..14c0cbad4f --- /dev/null +++ b/bin/tests/system/checkzone/zones/bad-svcb-alpn2.db @@ -0,0 +1,17 @@ +; 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. + +$TTL 600 +@ SOA ns hostmaster 2011012708 3600 1200 604800 1200 + NS ns +ns A 192.0.2.1 +; invalid zero length alpn (in midddle) due to missing double escape +svcb SVCB 1 . alpn=a\,\,abc diff --git a/bin/tests/system/checkzone/zones/bad-svcb-alpn3.db b/bin/tests/system/checkzone/zones/bad-svcb-alpn3.db new file mode 100644 index 0000000000..a479c2e7e7 --- /dev/null +++ b/bin/tests/system/checkzone/zones/bad-svcb-alpn3.db @@ -0,0 +1,17 @@ +; 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. + +$TTL 600 +@ SOA ns hostmaster 2011012708 3600 1200 604800 1200 + NS ns +ns A 192.0.2.1 +; invalid zero length alpn (at end) due to missing double escape +svcb SVCB 1 . alpn=abc\,