rofl0r / proxychains-ng

proxychains ng (new generation) - a preloader which hooks calls to sockets in dynamically linked programs and redirects it through one or more socks/http proxies. continuation of the unmaintained proxychains project. the sf.net page is currently not updated, use releases from github release page instead.
http://sourceforge.net/projects/proxychains-ng/files
GNU General Public License v2.0
9.82k stars 1.08k forks source link

Core dumped when querying non-existent host name with `proxy_dns_old` #493

Closed jeff-an closed 1 year ago

jeff-an commented 1 year ago

When running proxychains on a NodeJS program that queries a non-existent DNS name, I get the following error:

|DNS-request| analytics
|DNS-response|: analytics does not exist
err_dns: Invalid argument
../deps/uv/src/unix/getaddrinfo.c:90: uv__getaddrinfo_translate_error: Assertion `!"unknown EAI_* error code"' failed.
Aborted (core dumped)

This crashes the program entirely (the expected behavior is just to accept that there is no host name and continue).

I've tested this on proxychains 4.15 and 4.16 with the same result. I compiled on a ubuntu buster docker image with build-essential installed. ./configure && make && make install completely successfully and I can run proxychains4 curl google.com successfully.

BTW, i'm using query_dns_old because I need to add the +search option to dig in order to resolve some domain names in my Kubernetes environment. The query_dns option does not seem to have this capability or respect the configuration in /etc/resolv.conf.

The issue seems very similar to github.com/rofl0r/proxychains-ng/issues/343. Any help would be appreciated!

jeff-an commented 1 year ago

I was able to create a minimal reproduction with the ubuntu:18.04 docker image, node version v14.10.0, and the node-fetch@2 module for making the actual HTTP request.

rofl0r commented 1 year ago

please try whether current master fixes it, if not, paste output from a debug build (CFLAGS=-DDEBUG ./configure)

jeff-an commented 1 year ago

master works, thanks for the fast fix!