tcpdump mailing list archives
SIOCGIFCONF under Linux on Itanium in 32 bit compatibility mode
From: Shaun <delius () progsoc uts edu au>
Date: Mon, 23 Feb 2004 10:38:05 +1100 (EST)
Hi All, When running 32 bit code on the Itanium under Linux the kernel goes to some effort to try to mask the fact that the kernel is 32 bit and provide binary compatibility. Unfortunately, the compatibility layer frequently fails to adequately hide all of the details and one of these problems effects libpcap. In this case, the sys32_ioctl routine handles the SIOCGIFCONF ioctl and handles converting the input 32 bit ifconf struct into a 64 bit one then converts each of the 64 bit ifreq structures that are returned from the real ioctl handler back into 32 bit versions. Unfortunately it doesn't properly convert the ifc_len from the sum of the 64 bit ifreqs to the sum of the 32 bit reqs. Thus the ifc_len is incorrectly larger than expected. This bites libpcap because when it attempts to read off the end of the real end of the interfaces it finds an interface with an empty name and fails to retrieve the flags for the interface, terminating the interface finding procedure. The fix I commited to our internal licpcap is to 'break' out of the loop if we find an interface with a null name, does anyone object to this approach for the mainline? If not I'll send over a patch. Cheers, Shaun - This is the TCPDUMP workers list. It is archived at http://www.tcpdump.org/lists/workers/index.html To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe
Current thread:
- OpenBSD work on Tcpdump privilege separation Richard Bejtlich (Feb 21)
- Re: OpenBSD work on Tcpdump privilege separation Pekka Savola (Feb 21)
- Re: OpenBSD work on Tcpdump privilege separation Guy Harris (Feb 22)
- SIOCGIFCONF under Linux on Itanium in 32 bit compatibility mode Shaun (Feb 22)
- Re: SIOCGIFCONF under Linux on Itanium in 32 bit compatibility mode Guy Harris (Feb 22)
- Re: SIOCGIFCONF under Linux on Itanium in 32 bit compatibility mode Shaun (Feb 22)
- Re: SIOCGIFCONF under Linux on Itanium in 32 bit compatibility mode Guy Harris (Feb 27)
- Re: OpenBSD work on Tcpdump privilege separation Guy Harris (Feb 22)
- Re: OpenBSD work on Tcpdump privilege separation Pekka Savola (Feb 21)
- Re: OpenBSD work on Tcpdump privilege separation Guy Harris (Feb 22)
- Re: OpenBSD work on Tcpdump privilege separation Jefferson Ogata (Feb 23)
- Re: OpenBSD work on Tcpdump privilege separation Pekka Savola (Feb 23)
- Re: OpenBSD work on Tcpdump privilege separation Jefferson Ogata (Feb 24)