Nmap Development mailing list archives

Re: nmap 3.93 dumps core when exclude cidr netmask is less than 32


From: Fyodor <fyodor () insecure org>
Date: Tue, 22 Nov 2005 00:23:38 -0800

On Tue, Nov 15, 2005 at 10:12:08PM +0000, Adam wrote:
On Thu, 10 Nov 2005 nmapuser () globalmegahost com wrote:

[snip]
% nmap -n -sL --exclude 10.1.1.3/30 10.1.1.0/29

Starting nmap 3.93 ( http://www.insecure.org/nmap/ ) at 2005-11-10 15:10 MST
Assertion failed: (targets_type == IPV6_ADDRESS), function get_next_host, file TargetGroup.cc, line 429.
Abort (core dumped)

Thanks for the detailed gdb/valgrind logs.  I can't reproduce the
crash on my Linux box, but a look at the code shows what I think is
the problem.  Here is the diff:

flog~/nmap>svn diff targets.cc
Index: targets.cc
===================================================================
--- targets.cc  (revision 2891)
+++ targets.cc  (working copy)
@@ -1733,7 +1733,7 @@
         }
        else {
          exclude_group[i++].rewind();
-         continue;
+         break;
        }
       } 
       /* For ranges we need to be a little more slick, if we don't
       find a match

If you get a chance to test this, please let me know if it resolves
the problem.  I have applied this for the next version of Nmap.

Thanks,
Fyodor


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


Current thread: