News for hackers. Stuff that matters.
Re:Musl 1.2.4 adds TCP DNS fallback by InvaderFizz on Sunday July 30, 2023 @01:36PM (#36933750)
Glad to see this finally come to fruition.

This has been an issue plaguing Alpine for years where the musl maintainer basically said the standard says may fallback, not must fallback. Let the rest of the internet change, we don't feel this is important. We're standards complainant.

It gained traction for the change with the latest RFC. for dns last year which made TCP fallback mandatory [0]. The cloak of standards compliant could no longer be used.

0: https://datatracker.ietf.org/doc/html/rfc9210

Re:Musl 1.2.4 adds TCP DNS fallback by vidarh on Sunday July 30, 2023 @01:42PM (#36933840)
Yikes. The first time I ran into an issue where email delivery for a major provider was impossible without TCP fallback was 23 years ago. To treat this as optional this long is ridiculous.
Re:Musl 1.2.4 adds TCP DNS fallback by brmgb on Sunday July 30, 2023 @02:07PM (#36934146)
For all the good things Musl does, its authors can often be downright ridiculous out of a dogmatism which is very unpleasant to deal with as a user. See also their stubborn refusal to give you an easy way to detect that the libc is Musl while compiling.
Re:Musl 1.2.4 adds TCP DNS fallback by 0xcde4c3db on Sunday July 30, 2023 @03:16PM (#36934874)
> See also their stubborn refusal to give you an easy way to detect that the libc is Musl while compiling.

I suspect that the primary use cases for that would be applying half-baked workarounds and refusing to work with an "unsupported" libc, much like HTTP User-Agent.

Re:Musl 1.2.4 adds TCP DNS fallback by brmgb on Sunday July 30, 2023 @04:55PM (#36935872)
Or, you know, taking into account the stupid things Musl does like not having TCP DNS fallback.

I’m only half joking. Features detection in Musl is a generally pain. I don’t blame developers for sometimes taking the path of least resistance and not trying to support it.

Re:Musl 1.2.4 adds TCP DNS fallback by yjftsjthsd-h on Sunday July 30, 2023 @05:15PM (#36936063)
Well, if musl is standards compliant, then wouldn't it make sense to detect when you're building on something different rather than musl? Like, if the standard didn't require TCP fallback, then in theory the application should handle that and only skip it if it detects itself being built on a libc with non-standardized extensions to obviate the effort.
Re:Musl 1.2.4 adds TCP DNS fallback by brmgb on Sunday July 30, 2023 @05:22PM (#36936123)
Because as we all know the standard never changes potentially introducing new features, allows no variability and bugs don’t exist.

It must be nice living in your. theoretical world. Here in the real world, I like libraries to actually help me do what I want to do rather than be needlessly annoying to take a stand no one actually cares about. But that’s me. Clearly it serves Musl right given the massive amount of use it’s seeing. Hmm, wait a minute…

Re:Musl 1.2.4 adds TCP DNS fallback by yjftsjthsd-h on Sunday July 30, 2023 @05:32PM (#36936214)
Okay, so nobody uses it and you can stop complaining because it'll never come up.
Re:Musl 1.2.4 adds TCP DNS fallback by brmgb on Sunday July 30, 2023 @06:34PM (#36936688)
Well I would like to use it. It’s code is mostly sane, easier to understand than glibc and it would make sense in a lot of places where performances are not critical. That’s why I am so annoyed by the non sense its developers keep pulling out. It’s an incomprehensible situation because they get absolutely nothing out of it. They are basically annoying people for the sake of it. It’s incredible that changes like the one we are commenting on which are just sanity being restored have to come from evolution of the standard.
Re:Musl 1.2.4 adds TCP DNS fallback by zajio1am on Sunday July 30, 2023 @06:12PM (#36936537)
Standards are not laws, they are reasonably well-written documents describing behavior that is supposed to be interoperable. If, for some reason, that is not true (perhaps because the standard is ambiguous, obsolete or some other reason), ensuring that there is interoperability is more important than just keeping it to the letter of the standard.

See RFC 1925, The twelve networking truths:

(1) It has to work

Re:Musl 1.2.4 adds TCP DNS fallback by rcme on Sunday July 30, 2023 @08:58PM (#36937752)
Yes, it has to work. That’s exactly the point the person you’re responding to is making. There are plenty of things libc doesn’t provide. Software authors find way to provide functionality to make their software work regardless. How is DNS different? Just because you’re used to one specific implementation?
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.
Re:Musl 1.2.4 adds TCP DNS fallback by LexiMax on Sunday July 30, 2023 @01:48PM (#36933910)
> This has been an issue plaguing Alpine for years where the musl maintainer basically said the standard says may fallback, not must fallback. Let the rest of the internet change, we don't feel this is important. We're standards complainant.

I've never really understood the underlying mentality that causes maintainers to bend over backwards to _not_ provide popular functionality like this.

Reminds me a bit of the strlcpy/strlcat debacle with glibc.

Re:Musl 1.2.4 adds TCP DNS fallback by tptacek on Sunday July 30, 2023 @02:41PM (#36934518)
In this case it's not so much "popular functionality" as "core mechanism of the protocol". TCP DNS isn't a quality of life feature; it's necessary in order to look up record sets with e.g. lots of IPv6 addresses, because UDP DNS has a sharply limited response size.
Re:Musl 1.2.4 adds TCP DNS fallback by geocar on Sunday July 30, 2023 @03:41PM (#36935118)
Why would anyone want an RRset with more than 20 AAAA RRs?

What would they be doing with it that they couldn’t do better (faster/less bugs/risk) another way?

Re:Musl 1.2.4 adds TCP DNS fallback by marcus0x62 on Sunday July 30, 2023 @04:18PM (#36935498)
I'm sure they have their reasons. Some might even be good. Here's something I know I want: for my resolver to resolve valid DNS queries, no matter how stupid I believe the remote zone's maintainers to be.
Re:Musl 1.2.4 adds TCP DNS fallback by tptacek on Sunday July 30, 2023 @06:52PM (#36936834)
Sorry, I missed the spot in the DNS RFCs where they said RRsets are limited to 20 records. Got a reference? Thanks!
Re:Musl 1.2.4 adds TCP DNS fallback by geocar on Monday July 31, 2023 @01:06AM (#36939000)
Yeah gets() used to be in the standards too. Some standards are dumb.

I think this one might be dumb too which is why I’m asking.

Re:Musl 1.2.4 adds TCP DNS fallback by tptacek on Monday July 31, 2023 @02:24AM (#36939394)
You think the DNS standards might be dumb because they're not limiting enough?
Re:Musl 1.2.4 adds TCP DNS fallback by geocar on Monday July 31, 2023 @08:30AM (#36941623)
Yes. And I think anyone who thinks 10 IP6 addresses in a DNS response is useful for anything is making a huge mistake, let alone cramming 20+ on a long domain name to smash the response limit, but I am fully prepared to be convinced I was wrong if you had a compelling use-case.

Once upon a time, the DNS spec required requests come from port 53. This was terribly insecure, so many sysadmins patched their DNS server to not do this-- most servers at the time didn't care (including the incumbent), and the few that did were easy to convince of the error of their ways with a simple demonstration.

Then one day, a DNS server became quite popular that didn't do this by default, and perhaps because the DNS spec was written by a company that sold consulting for their (buggy) DNS server, they used this exact argument: that it was wrong because the spec said it was wrong. They patched their server to reject these messages and encouraged users to block this traffic.

That was wrong of them, and eventually, due to enough pressure they eventually caved. That's because the reality of good engineering doesn't give two fucks what the spec says.

So what's your use-case?

Re:Musl 1.2.4 adds TCP DNS fallback by richardwhiuk on Tuesday August 01, 2023 @03:59AM (#36953545)
Client side load balancing.
Re:Musl 1.2.4 adds TCP DNS fallback by geocar on Tuesday August 01, 2023 @12:57PM (#36958730)
Client side load balancing across a universe of 20+ disparate nodes sounds unnecessary. Why is 20+ better than just giving out 5 random members of the universe for your use-case?

Is this HTTP/S? SNMP? Something bespoke? Why doesn't the client already know where all the servers are? How far away are the servers from the client? Can you put code that lives in the client, or is this existing client software you're trying to trick into supporting client-side load balancing?

Also, and only slightly related: Do you have a different definition of "use-case" than me that involves being as vague as you possibly can?

Re:Musl 1.2.4 adds TCP DNS fallback by tptacek on Tuesday August 01, 2023 @05:19PM (#36963129)
I think at this point you're mostly making the argument I want to make for me.
Re:Musl 1.2.4 adds TCP DNS fallback by geocar on Tuesday August 01, 2023 @05:52PM (#36963644)
Got it: Thinking is hard.
Re:Musl 1.2.4 adds TCP DNS fallback by akira2501 on Sunday July 30, 2023 @02:03PM (#36934103)
People confuse purity with quality all the time.
Re:Musl 1.2.4 adds TCP DNS fallback by baq on Sunday July 30, 2023 @03:26PM (#36934973)
And since we’re talking about Debian, stability with stagnation.
Re:Musl 1.2.4 adds TCP DNS fallback by yjftsjthsd-h on Sunday July 30, 2023 @05:12PM (#36936035)
> I've never really understood the underlying mentality that causes maintainers to bend over backwards to _not_ provide popular functionality like this.

Probably trying to prevent feature creep; musl's home page describes it as

> musl is lightweight, fast, simple, free, and strives to be correct in the sense of standards-conformance and safety

And every single feature they add makes those things harder.

Re:Musl 1.2.4 adds TCP DNS fallback by kelnos on Sunday July 30, 2023 @02:43PM (#36934551)
Once I started reading about these issues a few years ago, I stopped using Alpine as a container base image, and started using Debian (the 'debian-slim' variant). Slim is still larger than Alpine, but not by a lot, and does contain some extra functionality in the base image that's useful for debugging (most of which can be fairly easily removed for security hardening). Debugging random DNS issues is difficult enough; there's no need to make it harder by using intentionally-faulty software.

While I wouldn't call myself a fan of Postel's Law (I think "being liberal with what you accept" can allow others to get away with sloppy implementations over long time periods, diluting the usefulness of standards and specifications), I think at some point you have to recognize the reality of how things are implemented in the real world, and that refusing to conform to the de-facto standard hurts your users.

The fact that the maintainer only caved because the TCP fallback behavior is finally being made mandatory, and not because he's (very belatedly) recognizing he's harming his users with his stubbornness, also speaks volumes... and not in a good way.

Re:Musl 1.2.4 adds TCP DNS fallback by soraminazuki on Sunday July 30, 2023 @08:45PM (#36937669)
> intentionally-faulty software

> the maintainer only caved

> he's harming his users with his stubbornness

A gentle reminder that you're not entitled to other people's free labor. It's one thing to disagree with technical decisions made by the project, but the shaming and name calling is a bit too much.

Re:Musl 1.2.4 adds TCP DNS fallback by marcus0x62 on Sunday July 30, 2023 @09:36PM (#36937922)
This is a ridiculous take. Nothing in the parent comment even remotely hints at feeling entitled to the labor of the Musl maintainers — they just disagree with implementation decisions that have been made.

And while I’d agree in principle that nobody is entitled to anyone else’s labor for free, I’d also add that nobody is entitled to be shielded from criticism of work they have chosen to publish, or to have that criticism be watered down to a sanitized, milquetoast version of the writer’s intended message.

Re:Musl 1.2.4 adds TCP DNS fallback by soraminazuki on Sunday July 30, 2023 @11:20PM (#36938474)
This shouldn't have to be spelled out loud, but you don't ever need to misrepresent the maintainer's position to criticize a technical decision. "They're harming everyone by intentionally shipping crippled software!" Really?
Re:Musl 1.2.4 adds TCP DNS fallback by marcus0x62 on Monday July 31, 2023 @08:34AM (#36941665)
One could say the same thing about your previous post, falsely claiming the person you replied to felt “entitled to someone’s labor,” when they said no such thing.
Re:Musl 1.2.4 adds TCP DNS fallback by soraminazuki on Monday July 31, 2023 @10:35AM (#36943166)
Now, that is a ridiculous take. By your definition, entitled people have to describe themselves as such? The rest of us use "entitlement" as a term to describe the action of others. People aren't making "false claims" when they do that.
Re:Musl 1.2.4 adds TCP DNS fallback by omniglottal on Monday July 31, 2023 @11:39AM (#36944275)
See "strawman fallacy". People absolutely are making false claims, including about entitlement. Your imagining someone to be entitled does not make them so, and your accusation belittles their actual, valid reasoning. It actually shows you to be the one "entitled" to your projected redeclaration of their identity and rationale - implying the accuser (you) is more likely to have narcissistic tendencies than the person holding a potentially shared value-based opinion about the facts being criticised. Furthermore, it's about irrellevant as calling out someone for being "entitled to breathe air" if you catch them criticizing the air's quality.
Re:Musl 1.2.4 adds TCP DNS fallback by soraminazuki on Monday July 31, 2023 @03:24PM (#36947560)
> See "strawman fallacy". People absolutely are making false claims, including about entitlement.

You certainly demonstrated the fallacy. You took the most absurd interpretation of my words that is possible in a literal sense because that's easier for you to mock.

Describing someone's behavior as entitled doesn't amount to making a false claim. That's the most obvious interpretation of what I actually said. But you took it to mean that any claim of entitlement can't be false.

> Your imagining someone to be entitled does not make them so, and your accusation belittles their actual, valid reasoning.

There's no imagination or accusation involved here when the very comment I'm referring to is right here in this very thread. It's a statement of fact.

The parts I quoted are ad hominem attacks that accuses someone of neglecting an obligation that objectively doesn't exist. That's the dictionary definition of entitlement.

> It actually shows you to be the one "entitled" to your projected redeclaration of their identity and rationale

Like misrepresenting my words or calling me "narcissistic?"

> potentially shared value-based opinion about the facts being criticised

The parts I quoted isn't a fact-based criticism. It's an ad hominem attack.

> irrellevant as calling out someone for being "entitled to breathe air" if you catch them criticizing the air's quality

Everyone is entitled access to clean air. People have an obligation to keep the air clean.

No one is entitled access to free labor, including having your pet features implemented and maintained in a software project.

But overall, gosh. How many fallacies, misrepresentations, and personal insults can you pack in such a short comment?

Re:Musl 1.2.4 adds TCP DNS fallback by orf on Monday July 31, 2023 @11:04PM (#36951828)
I mean… this is a lot of ink to spill over a comment that did sound incredibly entitled.
Re:Musl 1.2.4 adds TCP DNS fallback by camgunz on Monday July 31, 2023 @05:28AM (#36940341)
The stuff op quoted:

> intentionally-faulty software

> the maintainer only caved

> he's harming his users with his stubbornness

is strong language and not productive. If someone at my company sincerely criticized my work in this way I'd find it unacceptable and managers would get involved. There's criticism and there's polemics, and this is the latter.

Re:Musl 1.2.4 adds TCP DNS fallback by marcus0x62 on Monday July 31, 2023 @08:30AM (#36941620)
As it turns out, HN is not your office and HR isn’t here to “get involved.”. Thankfully.

I would agree there is a line, but disagree that the original poster stepped over it. Disagreement, even vigorous disagreement is important.

Calling out bad technical decisions is important.

Calling out oversensitive people who want to censor online discourse to their personal tastes is also important.

Re:Musl 1.2.4 adds TCP DNS fallback by soraminazuki on Monday July 31, 2023 @10:58AM (#36943584)
If criticism is "censorship," you are very much censoring me too. FYI I didn't ask anyone's post to be taken down.

Furthermore, ad hominem attacks have nothing to do with "calling out bad technical decisions."

Re:Musl 1.2.4 adds TCP DNS fallback by marcus0x62 on Monday July 31, 2023 @03:55PM (#36947915)
Now, that is a ridiculous take. By your definition, censorious people have to describe themselves as such? The rest of us use "censor" as a term to describe the action of others.
Re:Musl 1.2.4 adds TCP DNS fallback by soraminazuki on Monday July 31, 2023 @05:04PM (#36948805)
No, to censor means to remove speech and I have never defined it any other way. Calling out abuse for what it is hardly fits that definition.

BTW go take my words verbatim and use it against me if my actions are genuinely hypocritical. But to do that for my actions you made up is abusive and makes you look bad.

Re:Musl 1.2.4 adds TCP DNS fallback by marcus0x62 on Monday July 31, 2023 @05:52PM (#36949376)
Have a nice day.
Re:Musl 1.2.4 adds TCP DNS fallback by camgunz on Monday July 31, 2023 @04:59PM (#36948732)
> As it turns out, HN is not your office

Fair, but I'd hold HN to a higher standard. We're peers and we choose to be here. We should treat each other with kindness and respect, not contempt. I read a fair amount of contempt in OP's characterization, and I hold that separate from respectful criticism.

I looked up a thread about this from 2020 [0] and it actually seems well reasoned, calm, and respectful. No one's slinging around words like "faulty", "broken", or "harm" because those tend to insult people and derail technical discussions.

And FWIW, that's why I would get managers involved if this happened in the workplace. Calling people's work "broken by design" or "harmful" is how to start an argument, not how to solve a problem. If someone's acting this way, there's no way things are going well.

[0]: https://www.openwall.com/lists/musl/2020/04/17/7

Re:Musl 1.2.4 adds TCP DNS fallback by supazek on Sunday July 30, 2023 @10:34PM (#36938210)
Im gently informing you that you’re being ridiculously oversensitive if you think that post needed to be policed.
Re:Musl 1.2.4 adds TCP DNS fallback by boringuser2 on Sunday July 30, 2023 @10:38PM (#36938226)
This concept of ownership is questionable to begin with.

If that maintainer abandoned the project, it would either be picked up or abandoned altogether if the project were worthless.

It's a borderline case because it's almost worthless due to the aforementioned issues.

Re:Musl 1.2.4 adds TCP DNS fallback by cikey on Monday July 31, 2023 @07:07AM (#36940944)
we are not entitled to it, but it was the sole reason why our team (and it looks like others did too) stopped using alpine and i believe that should be valid feedback to the maintainer.
[dead]
Re:Musl 1.2.4 adds TCP DNS fallback by xyzzy_plugh on Sunday July 30, 2023 @02:54PM (#36934670)
Given the choice between maintaining a fork of a C standard library implementation and switching to an implementation that doesn't have this issue, the choice is pretty clear.

It was pretty clear that musl was unwilling to support adding any TCP fallback code path regardless of a patch existing.

Anyways, your comment is inflammatory and is full of straw-men. Try being less of a dick.

[dead]
Re:Musl 1.2.4 adds TCP DNS fallback by xyzzy_plugh on Sunday July 30, 2023 @03:15PM (#36934869)
I don't use musl, so I don't have a horse in this race, but I wouldn't use it anyways because of issues like this one.

Do they owe me anything? Of course not. Is anyone here claiming anything to the contrary? No. So what are you on about, exactly?

This is the comment section on a website. Here we are discussing that the project maintainers kinda cocked this one up from a reputation and user trust perspective. If reputation, user trust and thus adoption are not a concern or goal of the project, then cool, good for them. It doesn't mean, however, that there isn't some reputation or user trust that was eroded. And it certainly doesn't mean we can't discuss it.

For you to reply "what are you a child, just fork it and grow a pair, fix it yourself" is not constructive nor does it contribute to the discourse. Or did I put words in your mouth? Hm I wonder how that feels.

Re:Musl 1.2.4 adds TCP DNS fallback by yjftsjthsd-h on Sunday July 30, 2023 @05:10PM (#36936007)
> The cloak of standards compliant could no longer be used

Or in other words they've always been standards-compliant, and when the standard changed they updated to match it.

Re:Musl 1.2.4 adds TCP DNS fallback by fanf2 on Sunday July 30, 2023 @06:08PM (#36936502)
TCP support has been MUST implement for stub resolvers since 2016, so musl is several years late https://www.rfc-editor.org/rfc/rfc7766#page-6
Re:Musl 1.2.4 adds TCP DNS fallback by yjftsjthsd-h on Monday July 31, 2023 @01:40AM (#36939164)
Okay, then they haven't been standards-compliant for a very long time, which is a much more compelling point than arguing that they should be doing things beyond the standard.
Re:Musl 1.2.4 adds TCP DNS fallback by fanf2 on Monday July 31, 2023 @03:17AM (#36939640)
The reason the DNS TCP requirements RFCs were written was because of boneheads who don’t believe people who tell them it has been a non-optional part of the protocol since the 1980s
Re:Musl 1.2.4 adds TCP DNS fallback by geocar on Monday July 31, 2023 @08:39AM (#36941717)
You are mistaken. That is only a proposal to change the standard.

https://www.rfc-editor.org/faq/#allstds

https://www.rfc-editor.org/standards

Re:Musl 1.2.4 adds TCP DNS fallback by m3047 on Monday July 31, 2023 @12:30PM (#36945105)
"It's a catastrophe, but of little importance" -- Zizek

"RFC" is Request For Comments. Some RFCs become standards. But there are no internet police, notwithstanding that the internet is a fascist state (run by corporations for the benefit of corporations). Understanding it as a fascist state is the rational way to view "enforcement" as well as the natterings over whether something is a standard and who is going to enforce it anyway.

Re:Musl 1.2.4 adds TCP DNS fallback by nineteen999 on Sunday July 30, 2023 @06:40PM (#36936732)
The MX records for major email providers at the time (eg. Yahoo) didn't even fit into a UDP DNS packet back in 2002.

That they only just implemented this is a joke, and Alpine/musl users are the punchline.