Nmap - the Network Mapper. Github mirror of official SVN repository. https://svn.nmap.org/
Find a file
david f776c9c9a5 Use TIMEVAL_AFTER(...) instead of TIMEVAL_SUBTRACT(...) > 0 when deciding
whether a probe response counts as a drop for scan delay purposes. This avoids
an integer overflow in TIMEVAL_SUBTRACT that caused all responses to probes
retransmitted from the retry stack to be counted as drops. This would cause the
scan to grind to a near-halt, with the scan delay at 1000 ms, if even a few
hundred probes were retransmitted from the bench.

    Increased max_successful_tryno for 192.168.0.190 to 1 (packet drop)
    Increased max_successful_tryno for 192.168.0.190 to 2 (packet drop)
    Increasing send delay for 192.168.0.190 from 0 to 5 due to 216 out of 718 dropped probes since last increase.
    Increased max_successful_tryno for 192.168.0.190 to 3 (packet drop)
    Increasing send delay for 192.168.0.190 from 5 to 10 due to 92 out of 305 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 10 to 20 due to 11 out of 11 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 20 to 40 due to 11 out of 11 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 40 to 80 due to 11 out of 11 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 80 to 160 due to 11 out of 11 dropped probes since last increase.
    Increasing send delay for 192.168.0.190 from 160 to 320 due to 11 out of 11 dropped probes since last increase.
    ...

The problem was in this bit of code:

  if ((!rcvdtime && TIMEVAL_SUBTRACT(probe->sent, hss->sdn.last_boost) > 0) ||
      (probe->tryno > 0 && TIMEVAL_SUBTRACT(probe->prevSent, hss->sdn.last_boost) > 0)) {

the TIMEVAL_SUBTRACT(probe->prevSent, hss->sdn.last_boost) > 0) to be specific.
When a probe is retransmitted, the time it was sent is recorded in the prevSent
member of the retransmit probe. prevSent is properly set in retransmitProbe,
but it is not set in sendNextRetryStackProbe, which sends probes that have been
moved from the bench to the retry stack. The problem is that when probes are
moved to the bench they are compressed to probespecs and lose most of their
auxiliary information, like the send time. When they are retransmitted as real
UltraProbe objects, their prevSent message is left initialized to { 0, 0 }.
That led to the integer overflow, with TIMEVAL_SUBTRACT returning a nonsense
(but positive) value.

I fixed it by using TIMEVAL_AFTER(...), which works like
TIMEVAL_SUBTRACT(...) > 0 except that it is immune to integer overflows. Every
other timeval is after { 0, 0 }, so the condition is false for probes
retransmitted from the bench, as it should be. However this is not the most
correct solution. Better would be to somehow store each probe's send time with
it on the bench so it could be restored when it is retransmitted. The way the
bench and the retry stack work makes that cumbersome though, and this is the
only place prevSent is used, so I think this solution is acceptable.
2008-09-19 16:25:10 +00:00
docs Fix a typo in docs/nmap-install.xml: "should wor" -> "should work". 2008-09-16 00:26:47 +00:00
libdnet-stripped Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
liblua o The Nmap Windows self-installer now automatically installs the MS 2008-06-29 04:52:00 +00:00
libpcap
libpcre o The Nmap Windows self-installer now automatically installs the MS 2008-06-29 04:52:00 +00:00
macosx Merge from /nmap-exp/david/nmap-ndiff and /nmap-exp/david/zenmap-ndiff. 2008-09-18 15:51:40 +00:00
mswin32 Upgrading shipped OpenSSL for Windows to 0.9.8i, which contains 2008-09-18 21:47:45 +00:00
ndiff Update a unit test to match my new thinking about port state changes. 2008-09-19 00:42:53 +00:00
nselib make timing a little more conservative 2008-09-15 19:05:00 +00:00
scripts Add jah's enhanced ASN.nse that consolidates answers and gives up if the DNS 2008-09-16 17:35:44 +00:00
acinclude.m4
aclocal.m4 Adding Ncat to /nmap. This should have Ncat in the regular build systems for 2008-09-16 01:34:28 +00:00
CHANGELOG Upgrading shipped libdnet to 1.12 2008-09-19 06:12:25 +00:00
charpool.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
charpool.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
config.guess o Updated to latest (as of 3/15) autoconf config.sub/config.guess 2008-03-15 10:21:56 +00:00
config.sub o Updated to latest (as of 3/15) autoconf config.sub/config.guess 2008-03-15 10:21:56 +00:00
configure Merge from /nmap-exp/david/nmap-ndiff and /nmap-exp/david/zenmap-ndiff. 2008-09-18 15:51:40 +00:00
configure.ac Merge from /nmap-exp/david/nmap-ndiff and /nmap-exp/david/zenmap-ndiff. 2008-09-18 15:51:40 +00:00
COPYING trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
COPYING.OpenSSL
depcomp
FingerPrintResults.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
FingerPrintResults.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
global_structures.h Bump up MAX_OS_CLASSIFICATIONS_PER_FP from 8 to 10. 2008-07-15 20:07:25 +00:00
HACKING URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
idle_scan.cc Adding packet validity checking to readip_pcap() so the caller can assume the 2008-06-30 23:55:19 +00:00
idle_scan.h This patch reorganizes the way ping probes are handled internally. 2008-05-29 07:49:37 +00:00
INSTALL URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
ltmain.sh
MACLookup.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
MACLookup.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
main.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
Makefile.in Merge from /nmap-exp/david/nmap-ndiff and /nmap-exp/david/zenmap-ndiff. 2008-09-18 15:51:40 +00:00
missing
nmap-header-template.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap-mac-prefixes o Updated to include the latest MAC Address prefixes from the IEEE in 2008-05-30 21:47:20 +00:00
nmap-os-db In nmap-os-db, change references to MontaVista Linux to emphasize that it's embedded. 2008-09-17 22:32:13 +00:00
nmap-protocols URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
nmap-rpc URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
nmap-service-probes change classification of nginx from http-proxy to http 2008-09-09 11:46:34 +00:00
nmap-services small typo fix from Matt Selsky 2008-09-13 23:59:26 +00:00
nmap.cc Make xml_convert escape any character > 0x7F, and use xml_convert to escape the 2008-09-10 18:32:35 +00:00
nmap.h Update version number to 4.76 in prep for release 2008-09-12 05:58:06 +00:00
nmap.spec.in Merge from /nmap-exp/david/nmap-ndiff and /nmap-exp/david/zenmap-ndiff. 2008-09-18 15:51:40 +00:00
nmap_amigaos.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_config.h.in trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_dns.cc added get_dns_servers() to nmap_dns.cc/.h 2008-08-21 09:24:35 +00:00
nmap_dns.h Add a couple includes which are needed for Philip's nwe get_dns_servers function prototype 2008-09-13 07:13:33 +00:00
nmap_error.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_error.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_rpc.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_rpc.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_tty.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_tty.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nmap_winconfig.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
NmapOps.cc Make some change to make --without-liblua work again. 2008-08-05 19:28:51 +00:00
NmapOps.h Add --max-rate to go with --min-rate. 2008-07-30 00:15:57 +00:00
NmapOutputTable.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
NmapOutputTable.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
nse_binlib.cc Use nbase's s8, u8, s16, etc. types for specific-size integers rather than the 2008-08-29 20:57:36 +00:00
nse_binlib.h added nse_binlib.h 2008-07-31 14:18:21 +00:00
nse_bit.cc replace deprecated use of luaL_openlib with luaL_register 2008-09-09 13:23:14 +00:00
nse_bit.h Updated NSE's bit library to no longer be a shared library. 2008-08-27 22:23:50 +00:00
nse_debug.cc Large recode of nse_init.cc 2008-05-31 02:39:27 +00:00
nse_debug.h
nse_fs.cc Fix to Windows define for nse_fs 2008-05-31 08:22:39 +00:00
nse_fs.h Large recode of nse_init.cc 2008-05-31 02:39:27 +00:00
nse_hash.cc fixed two warnings in nse_hash.cc, code cleanup 2008-08-03 00:19:58 +00:00
nse_hash.h added nse_hash.h 2008-07-31 14:17:12 +00:00
nse_init.cc Remove a debugging function, stack_dump, that I used to step through NSE code. 2008-09-15 06:43:16 +00:00
nse_init.h Large recode of nse_init.cc 2008-05-31 02:39:27 +00:00
nse_macros.h Use a global table of loaded script file names, and don't load a script if its 2008-09-15 06:38:08 +00:00
nse_main.cc Fix for scripts returning multiple results causing the getting of the script's 2008-08-18 00:34:09 +00:00
nse_main.h Added ScriptResult class change in order to avoid managing string memory 2008-07-07 17:37:08 +00:00
nse_nmaplib.cc added nmap.get_dns_servers() to the NSE 2008-08-21 09:25:28 +00:00
nse_nmaplib.h Large recode of nse_init.cc 2008-05-31 02:39:27 +00:00
nse_nsock.cc Add a guard against getaddrinfo returning an empty list of addresses in 2008-09-04 14:36:48 +00:00
nse_nsock.h [NSE] Added fix for deadlocks on sockets. Now, 10 or max.parallelism threads 2008-07-31 07:35:19 +00:00
nse_pcrelib.cc Removed old unused procedure. 2008-09-03 22:16:59 +00:00
nse_pcrelib.h
osscan.cc Increase the line buffer for reading fingerprints in osscan.cc. The latest 2008-07-15 05:33:33 +00:00
osscan.h Make the parameter to parse_fingerprint_file const. 2008-06-13 17:32:47 +00:00
osscan2.cc Adding packet validity checking to readip_pcap() so the caller can assume the 2008-06-30 23:55:19 +00:00
osscan2.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
output.cc Remove "\r\r" in script output. If you print "\r\n", the Windows C library will 2008-09-12 21:33:14 +00:00
output.h Make some change to make --without-liblua work again. 2008-08-05 19:28:51 +00:00
portlist.cc Nmap now avoids collapsing large numbers of ports in open|filtered state if verbosity or debugging levels are greater than two. 2008-08-15 03:30:34 +00:00
portlist.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
portreasons.cc Nmap will no longer misreport a localhost-response during PN scans, it will now be reported as 'user-set'. 2008-07-29 17:01:31 +00:00
portreasons.h Nmap will no longer misreport a localhost-response during PN scans, it will now be reported as 'user-set'. 2008-07-29 17:01:31 +00:00
protocols.cc trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
protocols.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
README-WIN32 URL change from http://insecure.org/nmap/* to http://nmap.org/* 2008-01-17 07:22:03 +00:00
scan_engine.cc Use TIMEVAL_AFTER(...) instead of TIMEVAL_SUBTRACT(...) > 0 when deciding 2008-09-19 16:25:10 +00:00
scan_engine.h Save timing ping probes between calls to ultra_scan. This allows, for example, 2008-07-11 06:12:38 +00:00
service_scan.cc Documenting an earlier change and adding a new, related one: 2008-07-14 19:52:31 +00:00
service_scan.h This patch reorganizes the way ping probes are handled internally. 2008-05-29 07:49:37 +00:00
services.cc partial merge r9957 in bhdc08: nmap-services port frequency format has been changed to use percentage ratios in the file rather than fractional format (though the latter is still accepted) 2008-09-05 02:06:29 +00:00
services.h Improve the efficiency of loading the nmap-services file. We now use an STL map 2008-08-13 01:19:09 +00:00
shtool Upgrade shtool to version 2.0.8. This is supposed to fix NLS problems with 2008-08-19 17:49:47 +00:00
Target.cc Save timing ping probes between calls to ultra_scan. This allows, for example, 2008-07-11 06:12:38 +00:00
Target.h Save timing ping probes between calls to ultra_scan. This allows, for example, 2008-07-11 06:12:38 +00:00
TargetGroup.cc Check for the linked list returned by getaddrinfo being NULL as well as a 2008-09-04 14:27:55 +00:00
TargetGroup.h o Fixed an integer overflow which prevented a target specification 2008-06-03 19:25:16 +00:00
targets.cc Nmap will no longer misreport a localhost-response during PN scans, it will now be reported as 'user-set'. 2008-07-29 17:01:31 +00:00
targets.h trivial copyright text tweak: filename nmap-os-fingerprints has changed to nmap-os-db 2008-05-22 20:45:32 +00:00
tcpip.cc Add a guard against getaddrinfo returning no addresses in tcpip.cc. 2008-09-04 14:41:59 +00:00
tcpip.h constify the pointer passed to magic_tcpudp_cksum. 2008-08-21 17:43:23 +00:00
timing.cc Change RateMeter to be more general, measuring just one quantity. Add a 2008-08-16 01:05:11 +00:00
timing.h Change RateMeter to be more general, measuring just one quantity. Add a 2008-08-16 01:05:11 +00:00
traceroute.cc Use the cached timing ping probe as the traceroute probe in all situations. 2008-09-06 04:12:34 +00:00
traceroute.h Use the cached timing ping probe as the traceroute probe in all situations. 2008-09-06 04:12:34 +00:00
utils.cc Move tval2msecs() to Nbase for reuse 2008-07-15 20:06:05 +00:00
utils.h Move tval2msecs() to Nbase for reuse 2008-07-15 20:06:05 +00:00
zenmap.spec.in Include the new .desktop files in zenmap.spec.in. 2008-07-27 19:15:24 +00:00

Here is some documentation for Nmap, but these files are much less
comprehensive than what you'll find at the actual Nmap documentation
site ( http://nmap.org ).