Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with protocol ping (-PO) #1503

Open
djcater opened this Issue Mar 5, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@djcater
Copy link

djcater commented Mar 5, 2019

$ nmap -V 
Nmap version 7.70SVN ( https://nmap.org )
Platform: x86_64-unknown-linux-gnu
Compiled with: liblua-5.3.3 openssl-1.1.0g nmap-libssh2-1.8.0 libz-1.2.11 libpcre-8.39 libpcap-1.8.1 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select
$ sudo nmap -4 -vvv -d -sn -PO scanme.nmap.org 
Starting Nmap 7.70SVN ( https://nmap.org ) at 2019-03-05 11:42 GMT
--------------- Timing report ---------------
  hostgroups: min 1, max 100000
  rtt-timeouts: init 1000, min 100, max 10000
  max-scan-delay: TCP 1000, UDP 1000, SCTP 1000
  parallelism: min 0, max 0
  max-retries: 10, host-timeout: 0
  min-rate: 0, max-rate: 0
---------------------------------------------
Warning: Hostname scanme.nmap.org resolves to 2 IPs. Using 45.33.32.156.
Initiating Ping Scan at 11:42
Scanning scanme.nmap.org (45.33.32.156) [3 ports]
nmap: netutil.cc:4092: pcap_t* my_pcap_open_live(const char*, int, int, int): Assertion `device != NULL' failed.
Aborted

This is using the latest commit from trunk.

Forcing the interface with -e doesn't help.

I'm not sure when exactly this started, but I saw it a couple of months ago with 7.70SVN but forgot to file an issue at the time.

This actually occurs even with -PO1, even though -PE, -PP and -PM all work fine.

Let me know if there's anything else I can provide to help. Thanks.

@dmiller-nmap

This comment has been minimized.

Copy link

dmiller-nmap commented Mar 5, 2019

Confirmed. For me, only crashes when using -sn.

@dmiller-nmap

This comment has been minimized.

Copy link

dmiller-nmap commented Mar 5, 2019

Fix incoming. Nmap wasn't considering -PO to be a "raw scan type" and so was not setting the device name. This is usually masked by some other "raw scan type" like -sS, but using -sn prevents that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.