Nmap Development mailing list archives

Re: Assertion failure in nsock_core


From: David Fifield <david () bamsoftware com>
Date: Mon, 13 Jul 2009 22:25:22 -0600

On Mon, Jul 13, 2009 at 12:49:24PM -0600, David Fifield wrote:
On Tue, Jul 14, 2009 at 01:52:47AM +1000, Andrew Whatson wrote:
I seem to be getting an error when performing any scan with nmap
compiled off the latest svn (r14230).

The hosts on .1 and .2 are definitely up and ping fine - this seems to
be a bug introduced in Monday's commits.

I'm running ubuntu 2.6.31-2-generic x86_64 (karmic).

==========
# nmap -v -sP 192.168.1.*

Starting Nmap 4.90RC2 ( http://nmap.org ) at 2009-07-14 01:41 EST
NSE: Loaded 0 scripts for scanning.
Initiating ARP Ping Scan at 01:41
Scanning 3 hosts [1 port/host]
Completed ARP Ping Scan at 01:41, 0.23s elapsed (3 total hosts)
Host 192.168.1.0 is down.
Host 192.168.1.1 is down.
Host 192.168.1.2 is down.
Initiating Parallel DNS resolution of 1 host. at 01:41
nmap: nsock_core.c:139: socket_count_zero: Assertion
`iod->events_pending == 1' failed.
Aborted
==========

Thanks for the report. This is fixed in r14235. Please try it. The ping
failure is a separate issue; please tell us if it persists.

Brandon found some more assertion failures caused by this and other
recent Nsock changes. The first was a "sanity check" assertion I added
that checked to see that SSL was really set when an SSL connect event
was disposed of. It should not have been active if the underlying TCP
connection failed, but was anyway. It was fixed in r14255.

The second was caused by the fact that handle_connect_result is called
multiple times for SSL connections. In order to support pre-queued
events, the code was changed from zeroing all select bit to only
decrementing the count for each. It should have done this only once, but
it was being done every time SSL needed handle_connect_result to be
called again. This caused the assertion failure
ncat: nsock_core.c:142: socket_count_write_dec: Assertion `(iod->writesd_count) > 0' failed.
This one was fixed in r14262.

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: