segfault while proxying ssh on OpenBSD-current [OpenSSH_7.1 LibreSSL 2.3.2]

Author: shaxoCreated Dec 3, 2015Updated Feb 14, 2026

Hi, I don't know if it is an OpenBSD specific issue. I got a segfault in proxychains-ng when using a socks5 proxy to tunnel a ssh connection. SSH print "get_hostfile_hostname_ipaddr: getnameinfo failed" which causes the segfault.

tail -n 1 /tmp/px.conf

socks5 127.0.0.1 8888

./proxychains4 -f /tmp/px.conf ssh -vvvvvv [email protected]

Below is the gdb output with DEBUG activated. A more verbose output with SSH debug activated on http://pastebin.com/ZEwxmfYm

Starting program: /usr/bin/ssh [email protected] DEBUG:init_lib_wrapper called from gcc_init DEBUG:pid[1209]:at_init [proxychains] DLL init: proxychains-ng 4.10 DEBUG:loaded symbol 'connect' real addr 0x1c671ccc7060 wrapped addr 0x1c66b3595f2a DEBUG:loaded symbol 'sendto' real addr 0x1c671ccc64e0 wrapped addr 0x1c66b35969ab DEBUG:loaded symbol 'gethostbyname' real addr 0x1c670a38bdc0 wrapped addr 0x1c66b359656e DEBUG:loaded symbol 'getaddrinfo' real addr 0x1c670a387840 wrapped addr 0x1c66b35965dd DEBUG:loaded symbol 'freeaddrinfo' real addr 0x1c670a3b2200 wrapped addr 0x1c66b35966a2 DEBUG:loaded symbol 'gethostbyaddr' real addr 0x1c670a38bb90 wrapped addr 0x1c66b3596887 DEBUG:loaded symbol 'getnameinfo' real addr 0x1c670a389230 wrapped addr 0x1c66b3592344 DEBUG:loaded symbol 'close' real addr 0x1c671ccc7120 wrapped addr 0x1c66b3595e61 DEBUG:pid[1209]:wait_data DEBUG:[play] socks5 127.0.0.1:8888 DEBUG:getaddrinfo: 192.168.130.5 22 DEBUG:pid[1209]:proxy_getaddrinfo DEBUG:pid[1209]:mygetservbyname_r DEBUG:pid[1209]:pc_getnameinfo DEBUG:pid[1209]:connect DEBUG:target: 192.168.130.5 DEBUG:port: 22 DEBUG:pid[1209]:connect_proxy_chain DEBUG:[play] socks5 127.0.0.1:8888 [proxychains] Strict chain ... 127.0.0.1:8888 DEBUG:pid[1209]:timed_connect DEBUG: connect ret=0 DEBUG:pid[1209]:chain_step ... 192.168.130.5:22 DEBUG:pid[1209]:tunnel_to DEBUG:host dns ... OK DEBUG:pid[1209]:pc_getnameinfo DEBUG:freeaddrinfo 0x1c66e6008600 DEBUG:pid[1209]:proxy_freeaddrinfo DEBUG:pid[1209]:pc_getnameinfo get_hostfile_hostname_ipaddr: getnameinfo failed Program exited with code 0377.