News for hackers. Stuff that matters.
Re:Musl 1.2.4 adds TCP DNS fallback by geocar on Sunday July 30, 2023 @03:21PM (#36934924)
Email servers cannot use gethostbyname anyway; they never would have been affected by this issue.
Re:Musl 1.2.4 adds TCP DNS fallback by kstrauser on Sunday July 30, 2023 @03:36PM (#36935064)
I'm skeptical of that. Why do you say so?
Re:Musl 1.2.4 adds TCP DNS fallback by vidarh on Sunday July 30, 2023 @04:28PM (#36935604)
gethostbyname() only returns an address, it can't be used to e.g. query for MX records. You also lose control over retries to different addresses if you use gethostbyname(), which some mail server software will also care about.

However as I noted in my other reply, musl also implements the res_* functions, like res_send() etc., and those can be used to address both.

Re:Musl 1.2.4 adds TCP DNS fallback by vidarh on Sunday July 30, 2023 @04:17PM (#36935493)
It can't use gethostbyname() for looking up MX records, but plenty of mail related software have used it to look up A records.

However musl also includes res_send() etc., which can be used for MX records, and e.g. Qmail did use it back then. Here's the commit adding TCP support to those functions in Musl.

http://git.musl-libc.org/cgit/musl/commit/src/network/res_ms...

Re:Musl 1.2.4 adds TCP DNS fallback by geocar on Sunday July 30, 2023 @06:09PM (#36936515)
I wasn't aware musl implemented libres. I don't have a problem with libres doing TCP.

Qmail's issue was a hardcoded buffer size so this patch to musl wouldn't have helped.

Re:Musl 1.2.4 adds TCP DNS fallback by vidarh on Sunday July 30, 2023 @11:48PM (#36938619)
The point wasn't that this would have helped Qmail - Musl didn't exist back then for that matter -, but that running into the 512 byte limit and needing TCP fallback was already a thing. Bumping a buffer size is far less effort than having to replace the resolver.