Bug 3295

Summary: traceroute segfaults with -i
Product: [Retired] Red Hat Linux Reporter: mikepery
Component: tracerouteAssignee: Jay Turner <jturner>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-06-07 10:27:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description mikepery 1999-06-06 01:16:48 UTC
The USE_KERNEL_ROUTING_TABLE patch to traceroute causes it
to segfault with used with -i. This is because the
ifaddrlist is searched for the interface you specify, but
then the search_routing_table() call continues the search at
the position in the list found by the previous search.
Consequently, the second search eventually runs right past
the end of the array in a vain attempt to find a unique
interface. This unintialized memory (zeroed in my case)
causes a segfault when a field of the run away pointer is
passed to a strcmp.

Because all this red tape sickens me, and because I have
better things to do than to wait around for a BUG ID to
submit a one line patch, I'm going to describe the fix here.
Right around line 703 you add:
if(device == NULL && n > 1)
 right before the call to search_routing_table()

Comment 1 Jeff Johnson 1999-06-07 10:27:59 UTC
*** This bug has been marked as a duplicate of 2819 ***