Your message dated Wed, 25 May 2016 21:47:34 +0000
with message-id <[email protected]>
and subject line Bug#821913: fixed in nmap 6.47-3+deb8u1
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: 6.47-3+deb8u1

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: Tue, 24 May 2016 22:04:40 +0200
Source: nmap
Binary: nmap zenmap ndiff
Architecture: source amd64 all
Version: 6.47-3+deb8u1
Distribution: jessie
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: 773817 789776 789897 821913
Changes:
 nmap (6.47-3+deb8u1) jessie; urgency=medium
 .
   * Added upstream patch to deal with unuseable socks proxy (Closes:
     #773817)
   * Apply patch by Jan Nordholz to ignore unenumerable interfaces (Closes:
     #821913)
   * Moved ndiff.py from zenmap to ndiff, added versioned Breaks/Replaces
     (Closes: #789776, #789897)
Checksums-Sha1:
 90b9a6f07de7bf8a328e431455ba8b3bf3dd8753 2029 nmap_6.47-3+deb8u1.dsc
 dee815867312c02754eaf4d606d0e8609af9cf1f 29408 nmap_6.47-3+deb8u1.debian.tar.xz
 e8b54b0719a6e4261f040acca02163856e835307 3973732 nmap_6.47-3+deb8u1_amd64.deb
 3524828919dc3323eccee9217b07cc0930da5576 642410 zenmap_6.47-3+deb8u1_all.deb
 5f8c8de5b878de3ebd219f6b314c4e0f6b628385 256696 ndiff_6.47-3+deb8u1_all.deb
Checksums-Sha256:
 e9fc28972b2990189f276c1626cbdce538d2ed4b2f017c2a1fd01cfdb281ecab 2029 
nmap_6.47-3+deb8u1.dsc
 ba6c82561decdfb88ad03cf308d9a938a0dd81d11b3c9cbc0227192171423f72 29408 
nmap_6.47-3+deb8u1.debian.tar.xz
 8500a86ffba44502fccd849487f8cddaf345b9e19342e244acdcb9eb5e592440 3973732 
nmap_6.47-3+deb8u1_amd64.deb
 1fccf96566ca3ad00d74e6de74d03b66ef62bbbe4d1997e43353ca2ff5dae3c8 642410 
zenmap_6.47-3+deb8u1_all.deb
 d76b89a1dc08715b963e3cbe4da226c7c66e0d9056c075ff353778c504907af6 256696 
ndiff_6.47-3+deb8u1_all.deb
Files:
 cf21f15aeaa8befadf9f313fbd6e647c 2029 net extra nmap_6.47-3+deb8u1.dsc
 b74074453ba485130652d751de15987d 29408 net extra 
nmap_6.47-3+deb8u1.debian.tar.xz
 aab0bfb425e12406edffac7fd83f454e 3973732 net extra nmap_6.47-3+deb8u1_amd64.deb
 2359677571431833efe1da029ba4f698 642410 net extra zenmap_6.47-3+deb8u1_all.deb
 89b2d82a49e279f228072086cd963f66 256696 net extra ndiff_6.47-3+deb8u1_all.deb

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

iQIcBAEBCAAGBQJXRU68AAoJEHW3EGNcITp+U4IQAI2orsNMAxNRjl3cEZNUdyQQ
v5rTNFrwolddVyvO1Fe0BIQXggCIFjYtXG7NctwrVDiX9ueCrE22GdeOGRvm3lW/
yrBPjpWZCeLIqkAQ1JGXSTl0rW+isNVngATYRdm8JWK6jp+X6tt9oAzdgVPGpsrX
o0BkZK2/FzCaUpGEmE1iQRUlbVi11Od01SNEcW/BGjQe9O8vND7/q44vw3K14tJL
Y78ajwXHqmhocUh8KIeO87BkYZp7z/elelZuZ5lLUMbWfeDyBbtq9W945WXhmilS
XYNV7bi/OcPprWD8jE1DTGD1ju6hrut2NACTlWsVNUjACfKR2JlPmdX9B6BsEUii
2sZtqamZfw+6laaRhvS2eEEOVOUokv+DXUtcydmxDL5Qalbo/DQhescgxGqXam+q
LMKXpcEPt05S0xb82Hu1AauxKkSwW0gXAt/hMw+8BBkQl/LWijsNAQLLn798rwFn
t+yGWQLKbxIgUqFe+UzTArcsmi+JvghldLh4b5NY2vslra9LHJuOKhiNLIxGJEEH
TDzLX3AWBnHb2+rsunrB8zKIOWHKO2HAQVIBDQoFcXI2EcyL3qsfcdyLt4CSobL0
b515rlIFjukiBmIgqysvx4B4cFKgBNmVEFJPZ9+bWmntAAbke3BEyZm2YtT7h/22
K4JoBk0Kan1o50XILFQe
=wSSh
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to