arp-scan
arp-scan copied to clipboard
arp-scan fails on Solaris 11 with Segmentation Fault
root@solaris11:~/arp-scan# gdb ./arp-scan
GNU gdb (GDB) 7.6
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.11".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /export/home/rsh/arp-scan/arp-scan...done.
(gdb) run --localnet
Starting program: /export/home/rsh/arp-scan/arp-scan --localnet
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0x0805db04 in get_hardware_address (if_name=0x8047c62 "net0",
hw_address=hw_address@entry=0xfeffea5e "y\376") at link-dlpi.c:293
293 if (dlpi_msg(handle->fd, dlp, DL_PHYS_ADDR_REQ_SIZE, 0, DL_PHYS_ADDR_ACK,
(gdb) p handle
$1 = (link_t *) 0x0
arp-scan 1.5.1 works on Solaris 10, but fails on Solaris 11. It is believed that this is due to the new "vanity names" for network devices that were introduced with Solaris 11 not working with DLPI.
This is not considered to be a major issue, as Solaris is rarely seen nowadays. However, if this is causing you a problem, please comment against this issue and I will investigate further.
Added check for pointer returned by link_open and die with an error if it's NULL in commit 36de712
This doesn't solve the problem, but provides a better error message than receiving a SIGSEGV due to a null pointer dereference.
Example output on Solaris 11 is:
root@solaris11:~/arp-scan# ./arp-scan --localnet ERROR: cannot open interface net0 with DLPI
This issue won't be worked on unless someone comments, because I don't think Solaris is an important platform any more. So please comment if you care about this issue.