]> git.ipfire.org Git - thirdparty/bind9.git/commit
Properly reject zero length ALPN in commatxt_fromtext
authorMark Andrews <marka@isc.org>
Mon, 17 Jun 2024 13:16:28 +0000 (23:16 +1000)
committerMark Andrews <marka@isc.org>
Thu, 1 Aug 2024 00:20:55 +0000 (10:20 +1000)
commitb51c9eb7975ad883fc6380347b9be56d4976e730
treecaf199725984014fd457f1851d741eb2b8c199c7
parentb80a0faf0baded5219e33d14323a1b224079a20c
Properly reject zero length ALPN in commatxt_fromtext

ALPN are defined as 1*255OCTET in RFC 9460.  commatxt_fromtext was not
rejecting invalid inputs produces by missing a level of escaping
which where later caught be dns_rdata_fromwire on reception.

These inputs should have been rejected

svcb in svcb 1 1.svcb alpn=\,abc
svcb1 in svcb 1 1.svcb alpn=a\,\,abc

and generated 00 03 61 62 63 and 01 61 00 02 61 62 63 respectively.

The correct inputs to include commas in the alpn requires double
escaping.

svcb in svcb 1 1.svcb alpn=\\,abc
svcb1 in svcb 1 1.svcb alpn=a\\,\\,abc

and generate 04 2C 61 62 63 and 06 61 2C 2C 61 62 63 respectively.
lib/dns/rdata.c
tests/dns/rdata_test.c