-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[sparc64] nmap.git : Program received signal SIGBUS, Bus error. #2173
Comments
@mator Did you try bisecting this? It looks to me that the function pointer is misaligned. |
Bisecting lead me to this commit 4ffeb09:
|
|
That cast |
Hmm, it's definitely the function pointer which is misaligned:
But I have no idea why that happens. I don't see any obvious sources for misalignment. But I have no clue to be honest. |
Thanks for reporting this. Can you give some more information about your compiler and what options you used to build Nmap? A copy of |
I can do that later today as I just got up (CET time). But just as a heads-up, there is a fast SPARC Linux machine in the GCC compile farm that can be accessed by anyone: https://gcc.gnu.org/wiki/CompileFarm |
configure line:
compiler info:
makefile head:
nmap config.log https://gist.github.com/mator/dacbaa6a955dfc88352d19814158973b |
still valid for master branch
|
According to @karcherm the problem is most likely related to the odd sizes of Ethernet packages (if I remember correctly). You have to make sure the data is properly aligned before continuing with processing them. |
Well, the term "odd" is slightly misleading here. The standard ethernet ("Ethernet II") header consists of the 6-byte recipient address, the 6-byte sender address and the 2-byte protocol type field. The total size of that header is 14 bytes, which is (while even) not divisible by 4. If an IP packet is transfered over Ethernet using standard framing, the IP header is immediately following the the ethernet header. The design of the IP header makes sure that all fields are correctly aligned (i.e. 32-bit fields like sender and receiver IP address are on offsets divisible by 4, relative to the start of the IP header). The same is true for UDP and TCP: As long as the first byte of the IP header is aligned on an address divisble by 4, all 32-bit fields are correctly aligned. |
I've just hit this on Solaris (SPARC) as well - any update on this (or workaround)? I tried replacing the 4ffeb09 change removed |
I found the issue and managed to fix it with PR #2508. |
Awesome work, thanks a lot! |
Compiling the latest version of nmap from git , trying to scan a host, programs aborts with SIGBUS error.
I wasn't able to
git bisect
, since earlier versions does not compile for me (and there's nogit tags
as well)...Previous debian version of nmap (7.80) works without problems.
To Reproduce
Expected behavior
to be able to scan ports
Version info (please complete the following information):
nmap --version
:nmap --iflist
Additional context
configured with :
gdb run (backtrace) :
The text was updated successfully, but these errors were encountered: