Nmap Development mailing list archives

Re: Nmap SIGSEGV in nsock_proxychain_new with SOCKS4 proxies


From: Henri Doreau <henri.doreau () gmail com>
Date: Tue, 8 Jul 2014 18:38:07 +0200

2014-07-08 13:26 GMT+02:00 Jacek Wielemborek <d33tah () gmail com>:
List,

I just wanted to test Henri's suggestion on how to make Nmap use a
SOCKS4 proxy created by OpenSSH. I created a tunnel using ssh somehost
-D 8888, then tried the following:

$ nmap --proxy socks4://localhost:8888 ifconfig.me -sC -p 80
zsh: segmentation fault  nmap --proxy socks4://localhost:8888
ifconfig.me -sC -p 80

Then I realized that it's not even trying to connect, the crash happens
inside parse_options():

Program received signal SIGSEGV, Segmentation fault.
0x00007fd6e789b10a in nsock_proxychain_new ()
Missing separate debuginfos, use: debuginfo-install nmap-6.45-1.fc20.x86_64
(gdb) bt
#0  0x00007fd6e789b10a in nsock_proxychain_new ()
#1  0x00007fd6e7828da1 in parse_options(int, char**) ()
#2  0x00007fd6e782a5e2 in nmap_main(int, char**) ()
#3  0x00007fd6e780580b in main ()

Maybe we could use some more validation there that would prevent this
from happening?

Yours,
Jacek Wielemborek


Hi Jacek,

it's bad, indeed. Where exactly does it crash? Do you have any patch
applied? I cannot reproduce with current HEAD and can't see anything
obvious in the incriminated function...

Regards

-- 
Henri
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: