This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 85748 - nameif segfaults if run twice
nameif segfaults if run twice
Status: CLOSED ERRATA
Product: Red Hat Public Beta
Classification: Retired
Component: net-tools (Show other bugs)
phoebe
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Ben Levenson
:
: 89441 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-06 15:36 EST by Matt Domsch
Modified: 2015-03-04 20:12 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-03-19 05:08:29 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
I think this will fix it (1.75 KB, patch)
2003-03-06 18:47 EST, Bernd Eckenfels
no flags Details | Diff

  None (edit)
Description Matt Domsch 2003-03-06 15:36:00 EST
Description of problem:
nameif segfaults if run twice.



Version-Release number of selected component (if applicable):
net-tools-1.60 (from RHL8.0 and Phoebe beta5+ "special bits of rawhide")

How reproducible:
always

This note sent to net-tools@lina.inka.de:

I'm running net-tools-1.60 as found in Red Hat Linux 7.3, 8.0, and
special bits of rawhide (precursor to the public release of the beta
known as Phoebe).  In all cases, nameif segfaults if run twice on a
system.


The general case seems to be at the end of main, it frees ch twice.  At
least that's my guess.  GDB shows the fault is in calling free here.

while (clist) { 
                struct change *ch = clist;
                clist = clist->next;
                warning(_("interface '%s' not found"), ch->ifname); 
                free(ch); 
        }


Here's what the program reports:

interface 'wireless' not found
interface '' not found
Segmentation fault

Here's what my mactab has:

builtin 00:06:5B:B6:8B:E4
wireless    00:02:2D:5D:1D:48
dock        00:06:5B:EA:36:7A
(those are tabs between the ifname and the mac).

Here's what /proc/net/dev shows:
Inter-|   Receive                                                | 
Transmit
 face |bytes    packets errs drop fifo frame compressed
multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:  694808    6381    0    0    0     0          0         0  
694808    6381    0    0    0     0       0          0
builtin:       0       0    0    0    0     0          0        
0        0       0    0    0    0     0       0          0
  dock:98602373  291233    0    0    1     0          0         0 
6314187   53334    0    0    0     0       0          0
wireless:       0       0    0    0    0     0          0        
0        0       0    0    0    0     0       0          0


Since I've already called nameif once, my wireless device had its name
changed the first go-round.

I haven't had time to track this down further.  Any help would be
appreciated.

FWIW, I'm hoping to get Red Hat to add calling nameif during their
initscripts, inside
/etc/sysconfig/network-scripts/network-functions:is_available() after
the modprobe so we start getting the "right" names ASAP.
Comment 1 Matt Domsch 2003-03-06 18:15:55 EST
Moving to Public Beta status so Bernd Eckenfels <ecki@lina.inka.de> can see it.
 The public beta behaves the same way.
Comment 2 Bernd Eckenfels 2003-03-06 18:47:59 EST
Created attachment 90502 [details]
I think this will fix it

I annot reproduce it, but this patch produces a much simpler list handling. It
also fixes a small glitch in the usage printout, this is against 1.60. (CVS
nameif.c 1.1).
Comment 3 Matt Domsch 2003-03-07 00:50:07 EST
The above patch fixes it for me.
Leaving open until it's included in a release or errata.
Comment 4 Larry Troan 2003-03-11 14:54:32 EST
ISSUE TRACKER 17080 opened by Dell as Sev 3
Comment 5 Phil Knirsch 2003-03-19 05:08:29 EST
Patch verified and included in net-tools-1.60-13

Read ya, Phil
Comment 6 Phil Knirsch 2003-04-22 19:00:37 EDT
*** Bug 89441 has been marked as a duplicate of this bug. ***
Comment 7 John Flanagan 2003-12-19 09:46:16 EST
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2003-164.html

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