Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 163383 - arping on infiniband causes buffer overflow
Summary: arping on infiniband causes buffer overflow
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: iputils
Version: rawhide
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Radek Vokal
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks: 168806
TreeView+ depends on / blocked
 
Reported: 2005-07-15 18:59 UTC by Tom Duffy
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-18 07:26:55 UTC


Attachments (Terms of Use)
quick patch to fix buffer overflow in arping (deleted)
2005-07-15 21:01 UTC, Tom Duffy
no flags Details | Diff

Description Tom Duffy 2005-07-15 18:59:41 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050512 Epiphany/1.6.4

Description of problem:
When you run arping on an Infiniband device, it will cause a buffer overflow.  Something like this:

[root@sins-stinger-10 iputils]# ./arping -c 2 -w 3 -D -I ib0 192.168.0.233
*** buffer overflow detected ***: ./arping terminated
======= Backtrace: =========
/lib64/libc.so.6(__chk_fail+0x2f)[0x3b780dd23f]
./arping[0x40241b]
/lib64/libc.so.6(__libc_start_main+0xdc)[0x3b7801c4cc]
./arping[0x4015e9]
======= Memory map: ========
00400000-00404000 r-xp 00000000 08:02 134328693                          /usr/src/redhat/BUILD/iputils/arping
00503000-00504000 rw-p 00003000 08:02 134328693                          /usr/src/redhat/BUILD/iputils/arping
00504000-00525000 rw-p 00504000 00:00 0                                  [heap]
3b77c00000-3b77c1a000 r-xp 00000000 08:02 168058                         /lib64/ld-2.3.5.so
3b77d19000-3b77d1a000 r--p 00019000 08:02 168058                         /lib64/ld-2.3.5.so
3b77d1a000-3b77d1b000 rw-p 0001a000 08:02 168058                         /lib64/ld-2.3.5.so
3b78000000-3b7812e000 r-xp 00000000 08:02 168062                         /lib64/libc-2.3.5.so
3b7812e000-3b7822d000 ---p 0012e000 08:02 168062                         /lib64/libc-2.3.5.so
3b7822d000-3b78231000 r--p 0012d000 08:02 168062                         /lib64/libc-2.3.5.so
3b78231000-3b78233000 rw-p 00131000 08:02 168062                         /lib64/libc-2.3.5.so
3b78233000-3b78237000 rw-p 3b78233000 00:00 0
3b79100000-3b79111000 r-xp 00000000 08:02 684                            /lib64/libresolv-2.3.5.so
3b79111000-3b79211000 ---p 00011000 08:02 684                            /lib64/libresolv-2.3.5.so
3b79211000-3b79212000 r--p 00011000 08:02 684                            /lib64/libresolv-2.3.5.so
3b79212000-3b79213000 rw-p 00012000 08:02 684                            /lib64/libresolv-2.3.5.so
3b79213000-3b79215000 rw-p 3b79213000 00:00 0
3b7a300000-3b7a30d000 r-xp 00000000 08:02 168371                         /lib64/libgcc_s-4.0.0-20050520.so.1
3b7a30d000-3b7a40c000 ---p 0000d000 08:02 168371                         /lib64/libgcc_s-4.0.0-20050520.so.1
3b7a40c000-3b7a40d000 rw-p 0000c000 08:02 168371                         /lib64/libgcc_s-4.0.0-20050520.so.1
2aaaaaaab000-2aaaaaaad000 rw-p 2aaaaaaab000 00:00 0
2aaaaaad6000-2aaaaaad9000 rw-p 2aaaaaad6000 00:00 0
7fffffd06000-7fffffd1b000 rw-p 7fffffd06000 00:00 0                      [stack]ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]
Aborted (core dumped)

This is happening at line 479 in arping.c:

      memset(he.sll_addr, -1, he.sll_halen);

where he.sll_addr is 8 big, he.sll_halen is 20

Infiniband has 20 byte hardware address length.

Version-Release number of selected component (if applicable):
iputils-20020927-23

How reproducible:
Always

Steps to Reproduce:
1. configure you FC4 or rawhide system with infiniband card
2. setup ib0 or ib1 to come up on boot
3. arping is run from initscripts to see if IP address is in use
4. arping crashes
  

Additional info:

This only started happening in FC4 when D_FORTIFY_SOURCE was turned on at compile time.

Comment 1 Tom Duffy 2005-07-15 21:01:23 UTC
Created attachment 116822 [details]
quick patch to fix buffer overflow in arping

Comment 2 Radek Vokal 2005-07-18 07:26:55 UTC
Patch checked in, thanks


Note You need to log in before you can comment on or make changes to this bug.