Your message dated Sat, 23 Apr 2016 13:21:11 +0000
with message-id <[email protected]>
and subject line Bug#821913: fixed in nmap 7.01-3
has caused the Debian Bug report #821913,
regarding nmap: do not fail enumerating interfaces if there are unknown link 
types
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
821913: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821913
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: nmap
Version: 7.01-2
Severity: important

(renders package unusable, but only for an unlucky minority of users)

Hi,

my system configuration includes a firewire network device, so nmap fails to
find any interface whatsoever:

=====
root@inti:/tmp# nmap --iflist -d3

Starting Nmap 7.01 ( https://nmap.org ) at 2016-04-20 13:49 CEST
Fetchfile found /usr/bin/../share/nmap/nmap-services
PORTS: Using top 1000 ports found open (TCP:1000, UDP:0, SCTP:0)
INTERFACES: NONE FOUND(!)
Reason: getinterfaces_dnet: intf_loop() failed
ROUTES: NONE FOUND(!)
Reason: getsysroutes_dnet: sysroutes_dnet_find_interfaces() failed
=====

(Low-level reason if of interest: addr_ston() has a switch{} on supported
sa_family types, and that firewire interface comes in as (ignore the members
after sin_family, interpretation as sockaddr_in is obviously misleading)

=====
Breakpoint 1, 0x00000000004d8bb0 in addr_ston ()
(gdb) p/x *(struct sockaddr_in *)$rdi
$9 = {sin_family = 0x18, sin_port = 0xdef0, sin_addr = {s_addr = 0x636cfff1}, 
sin_zero = {0x40, 0xff, 0xa, 0x2, 0x0, 0x1, 0x0, 0x0}}
=====

for which (0x18 == ARPHRD_IEEE1394) there's no case.)

There have been occurrences of this behaviour before[1][2], and it's
ridiculous. The implementation of libdnet's _intf_loop() relies on every
single _intf_get_noalias() and _intf_get_aliases() call to succeed, which
means that if a single address interpretation through addr_ston() fails, the
whole scan comes up empty.

Instead the scan should just ignore unenumerable interfaces and report the
others - that way new link types don't break libdnet (and thus nmap) for
everybody who happens to have such interfaces.

A patch might look like this[att1]. With that applied, nmap --iflist shows
the desired list of interfaces (except for firewire0, as expected) again.


Thanks!

Jan

[1]: http://seclists.org/nmap-dev/2012/q3/997
[2]: http://seclists.org/nmap-dev/2012/q2/478
-- 
Jan Nordholz <[email protected]>
Security in Telecommunications <fgsect.de>
TU Berlin / Telekom Innovation Laboratories
Ernst-Reuter-Platz 7, Sekr TEL 17 / D - 10587 Berlin, Germany
phone: +49 30 8353 58663
Description: ignore errors when enumerating interfaces
 When _intf_get_noalias() or _intf_get_aliases() fail, that usually means
 that addr_ston() failed to grab the address for a certain family. As new
 address families pop up all the time it seems ridiculous that failing to
 parse a single address type should render the whole interface scan empty.
 Instead the interface should just be skipped and the other interfaces
 reported properly.
 .
 nmap (7.01-2.1) unstable; urgency=low
 .
   * Don't die while enumerating interfaces if addr_ston() fails.
Author: Jan Christoph Nordholz <[email protected]>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- nmap-7.01.orig/libdnet-stripped/src/intf.c
+++ nmap-7.01/libdnet-stripped/src/intf.c
@@ -928,12 +928,10 @@ intf_loop(intf_t *intf, intf_handler cal
                entry->intf_len = sizeof(ebuf);
                
                if (_intf_get_noalias(intf, entry) < 0) {
-                       ret = -1;
-                       break;
+                       continue;
                }
                if (_intf_get_aliases(intf, entry) < 0) {
-                       ret = -1;
-                       break;
+                       continue;
                }
                if ((ret = (*callback)(entry, arg)) != 0)
                        break;

--- End Message ---
--- Begin Message ---
Source: nmap
Source-Version: 7.01-3

We believe that the bug you reported is fixed in the latest version of
nmap, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Hilko Bengen <[email protected]> (supplier of updated nmap package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 23 Apr 2016 14:41:43 +0200
Source: nmap
Binary: nmap zenmap ndiff
Architecture: source
Version: 7.01-3
Distribution: unstable
Urgency: medium
Maintainer: Hilko Bengen <[email protected]>
Changed-By: Hilko Bengen <[email protected]>
Description:
 ndiff      - The Network Mapper - result compare utility
 nmap       - The Network Mapper
 zenmap     - The Network Mapper Front End
Closes: 821913
Changes:
 nmap (7.01-3) unstable; urgency=medium
 .
   * Apply patch by Jan Nordholz to ignore unenumerable interfaces
     (Closes: #821913)
Checksums-Sha1:
 2f1d0127b9a72589bc436c1586e16236fad0b143 1998 nmap_7.01-3.dsc
 2d2ee8a3def6de01055d06c041201ef251846d73 13644 nmap_7.01-3.debian.tar.xz
Checksums-Sha256:
 b95c6f51ebb100257f6639558f6e211cdd6d9442605833abfe5511a6b25915c7 1998 
nmap_7.01-3.dsc
 5a265586363bb9df07ec2c93123e2d0fadfd3ad7d4fa36c3596d96f01bbe0a4d 13644 
nmap_7.01-3.debian.tar.xz
Files:
 47c3abd98543393b6aedc6eb1190bcfb 1998 net extra nmap_7.01-3.dsc
 999e1ee52c067ab33c8ce55b9668f0be 13644 net extra nmap_7.01-3.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJXG2/VAAoJEHW3EGNcITp+K1AP/2Gda9WDFN49/dA9gEpY1o+M
wfyDCMw9QZ5JgsnSe5pm+REWPagwC+yzKBpdQkkYr9n3o2z6rVbEiIAImBWYlJPP
a5G8xnHQbxjHQjBeLXsqj3UQu7T4CZE4u6FT0g8l5d4Ly9OO/HGuDvSTq3HIZI7m
D9H+QVMW4A7Cp7eF58imtQlC2vaLLweHPNwpVzoYHuBwhjbD/YOIUDtJGtrZCyWa
YqaSAvH5MakLwbjTH33WAIDrXsoKQ1afaRmj0tj0GaOTLtCETEKO5wcnTzdGOjFt
+HtUZCIehmbYP6SLwIhewWwQh7OlvSasIbcQeFILwcWk4TYBWs7lNijGQW27u8GO
IU2O2eTslpR+56UrvLcvZGuhuTb2hBlfa80S0MhjJPCfLSNic6nECWExX+ZCbfL/
ZaV/xDS6G5etslb0W+ciWYYvW3OY+M1NJoTWPdQZS9tXlk6giDz43CEiqwtM+eXm
J2872x3C37PQiiio0JbIIDFRo5RRzS/bJjciH6e9FzMrHDFFI4J3D4Xp0r0+nMiO
2sHqpeoWY57TPLZUxx8YHorCJw03zbOsFRR8LMnD06kx+TFkP+itdqPU/nBfV6hl
YIVZaf3Vo0IFcy6TKvUh4G/EyaiOatSz02r9dC7dowAPxIrp1FIY9wATnhN7hF2V
McD9V+xKUPUbrDp895eM
=yfa6
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to