This is related to this change: https://git.musl-libc.org/cgit/musl/commit/?id=5cf1ac2443ad0dba263559a3fe043d929e0e5c4c made back in 2020. In the repro case, getaddrbyname() with AF_UNSPEC sends out two requests, but only gets back a single response, with the ipv4 address. There is no ipv6 on the network. name_from_dns() contains the relevant code. After __res_msend_rc() returns, 'nq' is 2, and 'alens' is [96, 0], indicating that there was an ipv4 response of 96 bytes, but no response for ipv6. Then the validation code runs: for (i=0; i