1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 13:49:03 +00:00

Fix IPv4 source address for host discovery

Reported here: http://seclists.org/nmap-dev/2014/q3/137

Hostgroups should have a common outgoing interface and source address,
determined by target_needs_new_hostgroup. Source address for raw IP
probes (sendIPScanProbe) is taken from the list of decoys (o.decoys),
which always at least contains a "self" element at index o.decoyturn.
This element was not being set while filling a hostgroup for massping,
so it was using whatever the value from the last hostgroup had. This
only matters when mixing targets that require different source
addresses, as demonstrated by scanning localhost and some other address.
This commit is contained in:
dmiller
2014-07-28 22:23:07 +00:00
parent b822aa9785
commit f17edebfc2

View File

@@ -643,6 +643,7 @@ static void refresh_hostbatch(HostGroupState *hs, const addrset *exclude_group,
break;
}
o.decoys[o.decoyturn] = t->v4source();
hs->hostbatch[hs->current_batch_sz++] = t;
}