Stuart Henderson <s...@spacehopper.org> wrote:

> On 2024/05/08 01:14, Volker Schlecht wrote:
> > aisha@ identified a rather recent problem with lang/node, as in the 
> > following
> > would immediately crash (nevermind the node version. It's 100% reproducible
> > in 7.5 and -current):
> > 
> > $ node
> > Welcome to Node.js v20.12.2.
> > Type ".help" for more information.
> > > require('dns').resolve4('openbsd.org','A',(err, records) => 
> > > {console.log(records);});
> > 
> > I tracked this back to the following pull request in libcares:
> > 
> > https://github.com/c-ares/c-ares/pull/659
> 
> So, specifically, this patch is setting SOCK_DNS for the situation where
> somebody using this library _might_ use pledge, but node is not using
> pledge.

That is just plain dumb.

If a socket is marked SOCK_DNS then it is *just for DNS*, and only the
very narrow set of operations used by libc/asr are supported.

Actually it is dumb, because it wasn't tested at all.

Reply via email to