Nmap Development mailing list archives

[NSE] Segfault in pcap_gc


From: Henri Doreau <henri.doreau () greenbone net>
Date: Wed, 4 Jan 2012 18:34:27 +0100

Hello,

I've noticed a crash in NSE (on linux, 64bits). A bug leads to a
segfault at the end of the execution, after a failed pcap_open() call.

I can reproduce reliably with (as root):
# ./nmap --script pcap_crash -p12345 127.0.0.1

The reproducer is attached, as well as the call stack. I've tracked it
a bit and figured out that in nsock_iod.c:254, mp->pcap_device is set
to 0x4 but lack time for further investigations today.
If I set more ports or change the debug level, it happens that the bug
isn't triggered.

HTH
Let me know if I can provide more information.

Regards.

-- 
Henri

Attachment: backtrace.txt
Description:

Attachment: pcap_crash.nse
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: