Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos



Nmap Development: Re: nmap on sparc/linux

Re: nmap on sparc/linux

From: Tom Duffy <tduffy_at_sun.com>
Date: Mon, 16 Dec 2002 16:42:33 -0800

On Mon, 2002-12-16 at 17:09, Cliff Woolley wrote:

> I assume it's a valid assumption among this group that everybody knows
> that SIGBUS on a Sparc usually means an unaligned access was attempted,
> right?

As Cliff pointed out, it is probably an unaligned access error. Here is
the culprit line after the preprocessor has had its way:

A = (ntohl(*(bpf_u_int32 *)&p[k]));

(gdb) disassemble ntohl
Dump of assembler code for function ntohl:
0x702ce540 <ntohl>: nop
0x702ce544 <ntohl+4>: retl
0x702ce548 <ntohl+8>: nop

ntohl is a noop because we are on a big endian architecture.

(gdb) print k
$15 = 30
(gdb) print &p[k]
$16 = (u_char *) 0x7267be "\n\aĆ\034\b"

Can we just make a char* an int* and dereference it? Only if it is 4
byte aligned.

-tduffy

-- 
YOO-ESS-AYE! YOO-ESS-AYE!
---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to 
nmap-dev-help_at_insecure.org . List run by ezmlm-idx (www.ezmlm.org).
Received on Dec 17 2002
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]