Nmap Development mailing list archives

Nsock assertion error in socks4a code when running a portscan -p-


From: Jacek Wielemborek <d33tah () gmail com>
Date: Tue, 30 Jun 2015 21:53:12 +0200

Hello,

I was experimenting with my nmap-nsock-ultrascan branch and when trying
to run "./nmap --unprivileged --proxy 'socks4://127.0.0.1:9050'
scanme.nmap.org -p-" with a tor instance running in the background, I
got the following error at about 60% of scanning progress:

nmap: nsock_event.c:463: event_new: Assertion `timeout_msecs >= 0' failed.

Program received signal SIGABRT, Aborted.
0x000000306ac348d7 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:55
55        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
Missing separate debuginfos, use: debuginfo-install
libpcap-1.7.2-1.fc21.x86_64
(gdb) bt
#0  0x000000306ac348d7 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:55
#1  0x000000306ac3653a in __GI_abort () at abort.c:89
#2  0x000000306ac2d47d in __assert_fail_base (fmt=0x306ad86cb8
"%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
    assertion=assertion@entry=0x5d8110 "timeout_msecs >= 0",
file=file@entry=0x5d7f50 "nsock_event.c", line=line@entry=463,
    function=function@entry=0x5d82e1 <__PRETTY_FUNCTION__.19151>
"event_new") at assert.c:92
#3  0x000000306ac2d532 in __GI___assert_fail (assertion=0x5d8110
"timeout_msecs >= 0", file=0x5d7f50 "nsock_event.c", line=463,
    function=0x5d82e1 <__PRETTY_FUNCTION__.19151> "event_new") at
assert.c:101
#4  0x000000000055c81b in event_new (nsp=0xddd0c0, type=NSE_TYPE_WRITE,
iod=0x1043700, timeout_msecs=-5,
    handler=0x561e69 <nsock_proxy_ev_dispatch>, userdata=0xe9b100) at
nsock_event.c:463
#5  0x000000000055b190 in nsock_write (ms_pool=0xddd0c0,
ms_iod=0x1043700, handler=0x561e69 <nsock_proxy_ev_dispatch>,
timeout_msecs=-5,
    userdata=0xe9b100, data=0x7fffffffc780 "\004\001\rm-! \234",
datalen=9) at nsock_write.c:137
#6  0x0000000000562b67 in handle_state_initial (nsp=0xddd0c0,
nse=0xde2a50, udata=0xe9b100) at proxy_socks4.c:170
#7  0x0000000000562d2e in proxy_socks4_handler (nspool=0xddd0c0,
nsevent=0xde2a50, udata=0xe9b100) at proxy_socks4.c:212
#8  0x0000000000561eeb in nsock_proxy_ev_dispatch (nspool=0xddd0c0,
nsevent=0xde2a50, udata=0xe9b100) at nsock_proxy.c:440
#9  0x000000000055c588 in event_dispatch_and_delete (nsp=0xddd0c0,
nse=0xde2a50, notify=1) at nsock_event.c:373
#10 0x0000000000558ca3 in process_event (nsp=0xddd0c0, evlist=0xddd0d8,
nse=0xde2a50, ev=2) at nsock_core.c:1067
#11 0x0000000000558e8e in process_iod_events (nsp=0xddd0c0,
nsi=0x1043700, ev=2) at nsock_core.c:1132
#12 0x00000000005603be in iterate_through_event_lists (nsp=0xddd0c0,
evcount=39) at engine_epoll.c:347
#13 0x000000000056028a in epoll_loop (nsp=0xddd0c0, msec_timeout=0) at
engine_epoll.c:314
#14 0x00000000005567c1 in nsock_engine_loop (nsp=0xddd0c0,
msec_timeout=0) at nsock_internal.h:419
#15 0x0000000000558763 in nsock_loop (nsp=0xddd0c0, msec_timeout=0) at
nsock_core.c:934
#16 0x0000000000507e57 in do_one_select_round (USI=0x7fffffffcc50,
stime=0x7fffffffcb80) at scan_engine_connect.cc:474
#17 0x000000000050136a in waitForResponses (USI=0x7fffffffcc50) at
scan_engine.cc:2489
#18 0x0000000000501e81 in ultra_scan (Targets=std::vector of length 1,
capacity 100 = {...}, ports=0x99f040 <ports>, scantype=CONNECT_SCAN, to=0x0)
    at scan_engine.cc:2705
#19 0x00000000004bd4b2 in nmap_main (argc=6, argv=0x7fffffffdb78) at
nmap.cc:2014
#20 0x00000000004b1b1e in main (argc=6, argv=0x7fffffffdb78) at main.cc:228
(gdb) frame 5
#5  0x000000000055b190 in nsock_write (ms_pool=0xddd0c0,
ms_iod=0x1043700, handler=0x561e69 <nsock_proxy_ev_dispatch>,
timeout_msecs=-5,
    userdata=0xe9b100, data=0x7fffffffc780 "\004\001\rm-! \234",
datalen=9) at nsock_write.c:137

Any ideas what could be wrong?

Cheers,
d33tah



Attachment: signature.asc
Description: OpenPGP digital signature

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

Current thread: