Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 22 Sep 2022 16:28:34 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: [PATCH] [draft] dns tcp fallback

Here is my first draft of the DNS TCP fallback support that seems to
be basically working. There may of course be bugs, and there are cases
where I probably don't want it to fall back like it's doing, but it's
at a stage where review and [smoke-]testing would be helpful.

Some known issues:

- getaddrinfo should use larger buffers (probably 640-768 bytes) or
  the "huge CNAME" problem iss not solved.

- If res_send is used to send EDNS0 queries crafted by the caller and
  the caller provides a buffer smaller than what the OPT header
  advertises, the answer will be silently truncated to the caller's
  buffer size.

I've tested querying TXT for locations.publicdns.goog (>7k RRset) and
basic non-fallback usage. Further large-answer query test cases would
be appreciated, especially names where one or both of the A or AAAA
RRset are large so that fallback in parallel lookup can be tested, and
later so that getaddrinfo buffer size increase can be tested.

Rich

View attachment "0001-adapt-res_msend-DNS-query-core-for-working-with-mult.patch" of type "text/plain" (2280 bytes)

View attachment "0002-res_send-use-a-temp-buffer-if-caller-s-buffer-is-und.patch" of type "text/plain" (1705 bytes)

View attachment "0003-dns-implement-tcp-fallback-in-__res_msend-query-core.patch" of type "text/plain" (7401 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.