Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 27 Jun 2022 13:35:50 +0200
From: Markus Geiger <markus.geiger@...lsen.com>
Cc: musl@...ts.openwall.com
Subject: Re: [BUG] Non-FQDN domain resolving failure on musl-1.2.x

Hi,

Thanks for the info. I'm not a everyday gdb user (once a year?) – but
I debugged the issue.

In musl 1.2.2 we run into EAI_AGAIN in name_from_dns on
network/lookup_name.c:166
In musl 1.1.24 we don't.

Just that I'm not quite sure if that behavior is correct – if you can
verify that it is correct behaviour treat this issue as resolved. And
thX for looking into it.

gdb backtrace -----------------------------------------------------------------------

#0  name_from_dns (buf=buf@...ry=0x7f5d11872490,
canon=canon@...ry=0x7f5d11872390 "slack.com",
name=name@...ry=0x7f5d118e1c10 "slack.com",
    family=family@...ry=0, conf=conf@...ry=0x7f5d1187219c) at
src/network/lookup_name.c:166
#1  0x00007f5d11cd8ac2 in name_from_dns_search (family=0,
name=0x7f5d118e1c10 "slack.com", canon=0x7f5d11872390 "slack.com",
buf=0x7f5d11872490)
    at src/network/lookup_name.c:219
#2  __lookup_name (buf=buf@...ry=0x7f5d11872490,
canon=canon@...ry=0x7f5d11872390 "slack.com",
name=name@...ry=0x7f5d118e1c10 "slack.com",
    family=family@...ry=0, flags=flags@...ry=0) at src/network/lookup_name.c:322
#3  0x00007f5d11cd5fdd in getaddrinfo (host=0x7f5d118e1c10
"slack.com", serv=serv@...ry=0x7f5d11872a7c "443",
hint=hint@...ry=0x7f5d1188d320,
    res=res@...ry=0x7f5d11872a20) at src/network/getaddrinfo.c:91
--Type <RET> for more, q to quit, c to continue without paging--
#4  0x00007f5d11c36ed8 in Curl_getaddrinfo_ex (nodename=<optimized
out>, servname=servname@...ry=0x7f5d11872a7c "443",
hints=hints@...ry=0x7f5d1188d320, result=result@...ry=0x7f5d1188d318)
    at curl_addrinfo.c:124
#5  0x00007f5d11c317ce in getaddrinfo_thread
(arg=arg@...ry=0x7f5d1188d2e8) at asyn-thread.c:305
#6  0x00007f5d11c39548 in curl_thread_create_thunk (arg=<optimized
out>) at curl_threads.c:57
#7  0x00007f5d11cf1221 in start (p=0x7f5d11872b00) at
src/thread/pthread_create.c:203
#8  0x00007f5d11cf33e0 in __clone () at src/thread/x86_64/clone.s:22

in we run into the line with return EAI_AGAIN with following locals
-----------------------------------------------------------------------

qbuf = {
  ":s\001\000\000\001\000\000\000\000\000\000\005slack\003com\000\000\001\000\001",
'\000' <repeats 13 times>, "\061\067\062.17.0.3\tee6c51ce088c\n\000st
ip6-loopback\n", '\000' <repeats 103 times>,
"\006\037\207\021]\177\000\000\350\034\207\021]\177\000\000\000\000\000\000\000\000\000\000"...,
  ";\237\001\000\000\001\000\000\000\000\000\000\005slack\003com\000\000\034\000\001\000\000\000\000\000|*\207\021]\177\000\000\210\035\207\021]\177\000\000\n\000\000\000\000\000\000\000|*\207\021]\177\000\000H\034\207\021]\177\000\000\006\037\207\021]\177\000\000\335\332\316\021]\177\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377",
'\000' <repeats 16 times>,
"\177*\207\021]\177\000\000\377\377\377\377\377\377\377\377", '\000'
<repeats 32 times>, "\377\377\377\377\377\377\377\377", '\000'
<repeats 24 times>...}
abuf = {
  "\n\000\000\000\000\000\000\000\314\000\000\000\000\000\000\000m\000\000\000\000\000\000\000\321\000\000\000\000\000\000\000t
ip6-lo\234!\207\021]\177\000\000\373\036\207\021]\177\000\000\234!\207\021]\177\000\000\001\000\000\000\000\000\000\000\351X\316\021]\177\000\000\217\035\207\021]\177\000\000\000\000\000\000\000\000\000\000\370\037\207\021]\177\000\000\370\000\000\000\000\000\000\000\b\036\207\021]\177\000\000\b\036\207\021]\177\000\000\360\036\207\021]\177\000\000R[\316\021]\177\000\000uters\n172.17.0.s\360\036\207\021]\177\000\000\247b\316\021]\177\000\000\000\000\000\000\000\000\000\000\"
\207\021]\177\000\000\b\036\207\021]\177\000\000"...,
  "nameserver 10.204.109.209\000\000\000\000\000\000\000\020\034\216\021]\177\000\000\377\377\377\377\377\377\377\377",
'\000' <repeats 64 times>, "\020\034\216\021]\177", '\000' <repeats 90
times>...}
qp = {0x7f5d11871ac0 ":s\001", 0x7f5d11871bd8 ";\237\001"}
ap = {0x7f5d11871cf0 "\n", 0x7f5d11871ef0 "nameserver 10.204.109.209"}
qlens = {27, 27}
alens = {0, 0}
i = 0
nq = 2
ctx = {addrs = 0x7f5d11872490, canon = 0x7f5d11872390 "slack.com", cnt = 0}

For diff please see attachment since Google Mail Plain Text mode just
.... you know.

I guess it has something to do with RR_AAAA.

Greetings,
Markus Geiger

Download attachment "image.png" of type "image/png" (157076 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.