curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Unit test 1655

From: Niall.oReilly+lists--- via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 12 Nov 2019 14:33:07 +0000

Hi.

[I’ve had a lot of trouble sending this. Apologies in case
 multiple copies arrive on the list.]

I’m looking to extend `dohprobe()` to allow retrieval of other
host attributes than addresses, some of which are published
at prefixed DNS names relative to the host name. I have had to
take account of unit test 1655, which puzzles me. I’m wondering
whether it may be appropriate to open an issue.

The very long name (`const char *bad = "this.is.` _et seq_.) is
invalid according to RFCs 1034 and 1035 both because it is too
long and because it contains embedded zero-length labels (which
are represented by consecutive dots). A strict encoder should
reject it early, and so frustrate the attempt to force a buffer
overflow.

A validly encoded pure (without EDNS) single query must fit
in 272 (12 + 256 + 4) octets, which is well below the buffer
size of 512 provided in `struct dnsprobe`.

Thanks in anticipation for advice on how best to proceed.

Niall O’Reilly

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-11-12