Nmap Development mailing list archives

Re: 3.90 Segmentation Fault ;-(


From: Paul Tarjan <ptarjan () gmail com>
Date: Fri, 9 Sep 2005 09:29:53 -0600

Well, this is the same thing I was working on before. If you take out
the -O2, it should work.. also, the -fno-aliasing directive should
also stop the problem.

Libpcap has some errors on GCC4.0. It builds a linked list with a null
node that causes a segfault when it is being dereferenced.

I'm looking into it. Try these directives and it should help. (I
thought Fyodor put them in the config file.. I'll check on it when I'm
back from Camping)

Paul

On 9/8/05, Craig Humphrey <Craig.Humphrey () chapmantripp com> wrote:
OK, two issues.  Fedora Core 4, just did a yum upgrade (though was lazy
and didn't reboot).
Gcc (GCC) 4.0.1 20050727 (Red Hat 4.0.1-5)
GNU gdb Red Hat Linux (6.3.0.0-1.21rh)

From configure:
configure: WARNING: linux/netfilter_ipv4/ipchains_core.h: present but
cannot be compiled
configure: WARNING: linux/netfilter_ipv4/ipchains_core.h:     check for
missing prerequisite headers?
configure: WARNING: linux/netfilter_ipv4/ipchains_core.h: see the
Autoconf documentation
configure: WARNING: linux/netfilter_ipv4/ipchains_core.h:     section
"Present But Cannot Be Compiled"
configure: WARNING: linux/netfilter_ipv4/ipchains_core.h: proceeding
with the preprocessor's result
configure: WARNING: linux/netfilter_ipv4/ipchains_core.h: in the future,
the compiler will take recedence
configure: WARNING:     ## ------------------------------------------ ##
configure: WARNING:     ## Report this to the AC_PACKAGE_NAME lists.  ##
configure: WARNING:     ## ------------------------------------------ ##

But that's probably not a biggie.

The main problem is the segfault:

Fired up nmap in emacs/gdb:
(gdb) run -sP 10.9.9.1
warning: cannot close "shared object read from target memory": File in
wrong format
Starting program: /home/craigh/nmap-3.90/nmap -sP 10.9.9.1
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xac5000

Starting nmap 3.90 ( http://www.insecure.org/nmap/ ) at 2005-09-09 10:36
NZST
Warning: File ./nmap-services exists, but Nmap is using
/usr/local/share/nmap/nmap-services for security and consistency
reasons.  set NMAPDIR=. to gi\
ve priority to files in your local directory (may affect the other data
files too).

Program received signal SIGSEGV, Segmentation fault.
0x08090cda in convert_code_r (p=0x9072f20) at ./optimize.c:2064
Current language:  auto; currently c

Line 2064 in optimize.c:  off = JF(p)->offset - (p->offset + slen) - 1;
(gdb) p offset
$1 = (struct slist **) 0x90730f0
(gdb) p slen
$2 = 1
(gdb) p p
$3 = (struct block *) 0x9072f20
(gdb) p p->offset + slen
$4 = 3
(gdb) p JF
No symbol "JF" in current context.

Umm to my uneducated (well, it's been a while since I had to debug C
code) mind, that looks to be the problem.  Is JF (and JT) some global or
macro?  They both report "No symbol ... In current context".

Hope that helps someone.

Later'ish
Craig


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



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


Current thread: