Nmap Development mailing list archives

Re: Nmap stops with error: "buffer 0verfl0w of familygenerations" on large scans


From: David Fifield <david () bamsoftware com>
Date: Tue, 20 Nov 2012 17:38:38 -0800

On Fri, Nov 16, 2012 at 10:26:00AM +0100, Jan Kaestle wrote:
Hi,

nmap stops on large scans with the error "buffer 0verfl0w of
familygenerations QUITTING!". Nmap just prints out this message and
stops. I got this error several times after scanning a few thousands
up to at most 40.000 hosts with OS and version detection enabled.

This is the command I used:

nmap -v -T4 -sS -Pn --top-ports 100 -n -sV --host-timeout 10m -O -oA
nmap_tcp_top100_1 -iL active_ips_all_1.txt

The error is printed in line 1541 in output.cc:
if (flen + 2 + strlen(OSR->OSC[classno]->OS_Generation) >=
    sizeof(familygenerations[familyno]))
  fatal("buffer 0verfl0w of familygenerations");

The error both occured on Debian 6.0.6 and Ubuntu 12.04

I am using Nmap 6.01.

For me I could fix this bug by doubling the array that is allocated in
line 1489 of output.cc

char familygenerations[MAX_OS_CLASSMEMBERS][96];

Thanks for this. I have committed the change increasing the buffer
length.

It might help if you can show us what strings are being concatenated to
make the result too long. If you can, please try this debugging patch
and send us the output.

David Fifield

Attachment: familygenerations-log.patch
Description:

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

Current thread: