Nmap Development mailing list archives
Re: Nping/gthostbynameCached
From: "Luis M." <luis.mgarc () gmail com>
Date: Mon, 08 Mar 2010 23:39:09 +0100
Hi Gisle, I've been having a look at the problem you reported but I don't see any problem with the code. In my box it works. Can you please run nping with the "-d9" flag and email the output it produces? Also, if you can, run it through valgrind and attach the output. It's weird because the only thing that gethostbynameCached() does is to make deep copies of the hostent struct returned by gethostbyname() and return those copies in case of duplicate calls. However, valgrind is complaining about the way we are doing this. I'll have a deeper look into it and let you know. Luis MartinGarcia. ==28798== Address 0x5d68f90 is 0 bytes after a block of size 48 alloc'd ==28798== at 0x4C24477: calloc (vg_replace_malloc.c:418) ==28798== by 0x426F75: safe_zalloc (in /usr/local/bin/nping) ==28798== by 0x41C50E: hostentcpy(hostent*) (in /usr/local/bin/nping) ==28798== by 0x41C65E: gethostbynameCached(char*) (in /usr/local/bin/nping) ==28798== by 0x410A09: TargetGroup::parse_expr(char const*, int) (in /usr/local/bin/nping) ==28798== by 0x423114: NpingTargets::getNextTargetAddressAndName(sockaddr_storage*, unsigned long*, char*, unsigned long) (in /usr/local/bin/nping) ==28798== by 0x423543: NpingTargets::processSpecs() (in /usr/local/bin/nping) ==28798== by 0x415AE1: main (in /usr/local/bin/nping) ==28798== Gisle Vanem wrote:
Something is seriously wrong with the function gethostbynameCached(). When I use nping with an IP-address everything works fine. But it crashes on the first hostname. A quick fix for me, is to revert to gethostbyname() in common_modified.cc / 436. Just a FYI. --gv For every credibility gap, there is a gullibility fill. _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Nping/gthostbynameCached Gisle Vanem (Mar 06)
- Re: Nping/gthostbynameCached Luis M. (Mar 06)
- Re: Nping/gthostbynameCached Gisle Vanem (Mar 14)
- Re: Nping/gthostbynameCached Luis M. (Mar 15)
- Re: Nping/gthostbynameCached Gisle Vanem (Mar 14)
- Re: Nping/gthostbynameCached Luis M. (Mar 08)
- Re: Nping/gthostbynameCached Luis M. (Mar 06)