1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Enable IPv6 traceroute only for TCP and ICMPv6.

The other protocols that are implemented for IPv4 are not implemented
for IPv6, leading to an assertion failure.

nmap: traceroute.cc:749: virtual unsigned char* UDPProbe::build_packet(const sockaddr_storage*, u32*) const: Assertion `source->ss_family == 2' failed.

This was noticed by Pierre Emeriaud.
http://seclists.org/nmap-dev/2012/q4/36
This commit is contained in:
david
2012-10-06 21:26:30 +00:00
parent bc0c6d17b4
commit cf0b55788f
2 changed files with 13 additions and 3 deletions

View File

@@ -1,5 +1,12 @@
# Nmap Changelog ($Id$); -*-text-*-
o Fixed an assertion failure with IPv6 traceroute trying to use an
unsupported protocol:
nmap: traceroute.cc:749: virtual unsigned char*
UDPProbe::build_packet(const sockaddr_storage*, u32*) const: Assertion
`source->ss_family == 2' failed.
This was reported by Pierre Emeriaud. [David Fifield]
o [NSE] Added oracle-brute-stealth which exploits CVE-2012-3137, a weakness
in the Oracle O5LOGIN authentication scheme. [Dhiru Kholia]

View File

@@ -555,10 +555,13 @@ struct probespec HostState::get_probe(const Target *target) {
struct probespec probe;
probe = target->pingprobe;
if (probe.type == PS_TCP || probe.type == PS_UDP || probe.type == PS_ICMP ||
probe.type == PS_SCTP || probe.type == PS_ICMPV6) {
if (target->af() == AF_INET &&
(probe.type == PS_TCP || probe.type == PS_UDP || probe.type == PS_SCTP || probe.type == PS_ICMP)) {
/* Nothing needed. */
} else if (probe.type == PS_PROTO) {
} else if (target->af() == AF_INET6 &&
(probe.type == PS_TCP || probe.type == PS_ICMPV6)) {
/* Nothing needed. */
} else if (target->af() == AF_INET && probe.type == PS_PROTO) {
/* If this is an IP protocol probe, fill in some fields for some common
protocols. We cheat and store them in the TCP-, UDP-, SCTP- and
ICMP-specific fields. */