Bug 88533 - LTC2500 - lokkit crashes if too many ethernet devices
LTC2500 - lokkit crashes if too many ethernet devices
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: redhat-config-securitylevel (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
David Lawrence
:
: 108956 (view as bug list)
Depends On:
Blocks: 116727
  Show dependency treegraph
 
Reported: 2003-04-10 14:21 EDT by Mike Ranweiler
Modified: 2007-11-30 17:06 EST (History)
4 users (show)

See Also:
Fixed In Version: 0.50-23
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-17 08:01:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike Ranweiler 2003-04-10 14:21:13 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130

Description of problem:
Please fill in each of the sections below.

Hardware Environment: iSeries

Software Environment: Red Hat 7.1 64bit refresh


Actual Results:

Expected Results:

Additional Information:
Looks like it's a generic bug on in all lokkit packages (all arch's).  Here's
the patch (against gnome-lokkit-0.43-6):


--- newt.c.orig		 Wed Apr  9 16:51:10 2003
+++ newt.c		 Wed Apr  9 16:51:34 2003
@@ -42,7 +42,7 @@
 		 		 		     strcmp(dent->d_name,"ifcfg-lo")) {
 		 		 		 		 if (num > 10)
 
-		 		 		 		   ret = realloc(ret, num+1 * sizeof(char *));
+		 		 		 		   ret = realloc(ret, (num+1) * sizeof(char *));
 		 		 		 		 ret[num] = strdup(dent->d_name+6);
 		 		 		 		 num++;
 		 		 		 }


Version-Release number of selected component (if applicable):
gnome-lokkit-0.43-6

How reproducible:
Always

Steps to Reproduce:
Steps to Reproduce:
1.  Have lots of ifcfg-eth* files in /etc/sysconfig/network-scripts
2.  lokkit
3.  hangs or seg faults

Additional info:
Comment 1 Mike Ranweiler 2003-05-30 12:28:15 EDT
------- Additional Comment #2 From Michael Ranweiler  2003-05-30 12:22 -------

Be nice to have this in RHEL 3.
Comment 2 Bill Nottingham 2003-05-30 16:04:39 EDT
fixed in -23.
Comment 3 Mike Ranweiler 2003-07-31 15:09:49 EDT
------ Additional Comments From tabieste@us.ibm.com  2003-31-07 14:57 -------
After installing these packages, and booting from the kernel it places 
in /boot/vmlinux:

cross-ppc64-binutils-2.13.90.0.16-6.ppc.rpm
cross-ppc64-gcc-3.2.1-3.ppc.rpm
iptables-1.2.5-3.ppc.rpm
iptables-ipv6-1.2.5-3.ppc.rpm
kernel-iseries-2.4.18-27.7.x.p.8.ppc64.rpm
modutils-2.4.22-7.0p.ppc.rpm
modutils-devel-2.4.22-7.0p.ppc.rpm

...lokkit still hangs or segmentation faults, when lots of ifcfg-ethx are 
in /etc/sysconfig/network-scripts/ (I had about 11).

Possibly the patch was not included in these rpms?

I've also noticed that lokkit has the same problems in RHEL 3 Beta 1; if there 
is a patch, could it also to applied there as well? 
Comment 4 Bill Nottingham 2003-07-31 15:14:59 EDT
By 'installing these packages', you don't actually put lokkit in the list of the
packages you install. If you don't install it, you won't get the fix.
Comment 5 Mike Ranweiler 2003-07-31 19:17:32 EDT
------ Additional Comments From mranweil@us.ibm.com  2003-31-07 18:57 -------
Patch is incomplete.  The patch in newt.c makes it not segfault immediately on
startup.  However, now it seg faults when you select customize.  What seems to
be the problem is that you get too many rows of ethernet devices...  I just
created more ifcfg-ethx files and going from 8 to 9 the customize screen seg
faults.....

This might be it - but we haven't tried it yet.... not sure if that's the best
way...
--- newt.c.orig 2003-07-31 16:38:02.000000000 -0500
+++ newt.c      2003-07-31 16:40:18.000000000 -0500
@@ -342,7 +342,7 @@
                int curcol, currow, rows, cols;

                if (numdevices > 4) {
-                       rows = numdevices % 4 + 1;
+                       rows = (numdevices - 1) / 4 + 1;
                        cols = 4;
                } else {
                        cols = numdevices; 
Comment 6 Mike Ranweiler 2003-08-20 12:29:03 EDT
The first patch got us past the first screen.  There's a second screen that had
a second problem - the patch in comment #5 is for that problem.  We had some
problem building the src rpm at that time - and didn't get back to it yet.... 
But the patch is really pretty simple.
Comment 7 Mike Ranweiler 2003-09-21 22:00:02 EDT
I'll check out the second patch soon...
Comment 8 IBM Bug Proxy 2003-09-26 10:36:13 EDT
------ Additional Comments From khoa@us.ibm.com  2003-26-09 00:28 -------
Mike - any update on this bug ? 
Comment 9 IBM Bug Proxy 2003-10-15 20:47:24 EDT
------ Additional Comments From khoa@us.ibm.com  2003-15-10 18:59 -------
Any update on this bug ? 
Comment 10 IBM Bug Proxy 2003-10-15 20:48:02 EDT
------ Additional Comments From mranweil@us.ibm.com  2003-15-10 19:19 -------
I'll check out the second patch this week.  This is arch, independent, though.... 
Comment 11 Bill Nottingham 2003-11-03 15:41:37 EST
*** Bug 108956 has been marked as a duplicate of this bug. ***
Comment 12 mark wisner 2003-11-25 06:04:05 EST
------ Additional Comments From khoa@us.ibm.com  2003-25-11 02:24 -------
Mike - any update on this bug ? 
Comment 13 IBM Bug Proxy 2004-01-23 23:48:08 EST
----- Additional Comments From khoa@us.ibm.com  2004-01-23 10:01 -------
Mark will check if this is still supported by Red Hat. 
Comment 14 IBM Bug Proxy 2004-01-23 23:57:35 EST
----- Additional Comments From khoa@us.ibm.com  2004-01-23 12:29 -------
Red Hat reported today that this is fixed in RHEL3.  I then checked with 
Mike Ranweiler and he told me that the first part was fixed, but not the
second part.  Here's the second part (copied from Mike's previous
comment):

Patch is incomplete.  The patch in newt.c makes it not segfault immediately on
startup.  However, now it seg faults when you select customize.  What seems to
be the problem is that you get too many rows of ethernet devices...  I just
created more ifcfg-ethx files and going from 8 to 9 the customize screen seg
faults.....

This might be it - but we haven't tried it yet.... not sure if that's the best
way...
--- newt.c.orig 2003-07-31 16:38:02.000000000 -0500
+++ newt.c      2003-07-31 16:40:18.000000000 -0500
@@ -342,7 +342,7 @@
                int curcol, currow, rows, cols;

                if (numdevices > 4) {
-                       rows = numdevices % 4 + 1;
+                       rows = (numdevices - 1) / 4 + 1;
                        cols = 4;
                } else {
                        cols = numdevices;



We need Red Hat to fix this second part as well.  Thanks. 
Comment 15 IBM Bug Proxy 2004-01-26 14:03:50 EST
----- Additional Comments From mranweil@us.ibm.com  2004-01-26 13:52 -------
The package was changed around some, here's the current patch:

[root@dopeyeth src]# diff -Naur lokkit.c.orig lokkit.c
--- lokkit.c.orig       2004-01-23 12:30:30.000000000 -0500
+++ lokkit.c    2004-01-23 12:31:19.000000000 -0500
@@ -311,7 +311,7 @@
                int curcol, currow, rows, cols;
  
                if (numdevices > 4) {
-                       rows = numdevices % 4 + 1;
+                       rows = ((numdevices - 1)/ 4) + 1;
                        cols = 4;
                } else {
                        cols = numdevices;

I tried it quick - it works.  This fixes a seg fault going to the customize
screen with lots of ethernet devices. 
Comment 16 IBM Bug Proxy 2004-01-30 15:43:37 EST
----- Additional Comments From khoa@us.ibm.com  2004-01-30 15:31 -------
I've put this on RHEL3 Update3 list as a Sev2. 
Comment 21 Brent Fox 2004-06-29 11:24:41 EDT
Ok, I've built redhat-config-securitylevel-1.2.9-2 in dist-3.0E-U3. 
I'll start pushing this through the errata process.
Comment 25 Jay Turner 2004-08-17 08:01:01 EDT
Fix confirmed with redhat-config-securitylevel-1.2.9-2.  Closing out.
Comment 26 Jay Turner 2004-09-02 00:19:23 EDT
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-2004-353.html
Comment 27 IBM Bug Proxy 2004-10-11 10:21:51 EDT
----- Additional Comments From pbowen@us.ibm.com  2004-10-11 10:17 EDT -------
Can someone please tell me where we should verify this fix? 
Comment 28 IBM Bug Proxy 2004-10-25 10:32:40 EDT
----- Additional Comments From pbowen@us.ibm.com  2004-10-25 10:32 EDT -------
Redhat - please check the status of the bug on your side and indicate where we 
should verify the fix, thanks. 
Comment 29 IBM Bug Proxy 2005-03-24 22:41:19 EST
---- Additional Comments From gaoming@cn.ibm.com  2005-03-24 22:37 EST -------
I tested this on rhel3qu5b1 on jcktr.rchland.ibm.com by the folowing steps:
1) add 16 veths to the partition in sst.
2) reboot it
3) modprobe veth
4) add "alias eth0 veth" ... "alias eth15 veth" to /etc/modules.conf
5) create files "ifcfg-eth0" ... "ifcfg-eth15" under /etc/sysconfig/network-
scripts/
6) run "lokkit"

A interface of "Firewall Configuration" appears and can be configured 
successfully. 
Comment 30 IBM Bug Proxy 2005-04-04 18:24:49 EDT
changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Impact|------                      |Functionality




------- Additional Comments From yongwenw@us.ibm.com  2005-04-04 18:20 EST -------
Close based on comment #24. 
Comment 31 IBM Bug Proxy 2005-04-04 18:25:10 EDT
---- Additional Comments From yongwenw@us.ibm.com  2005-04-04 18:21 EST -------
Oops, guess I don't have the option to close. This is tested and passed. Can 
someone please close the bug? 
Comment 32 IBM Bug Proxy 2005-04-05 01:23:50 EDT
changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|SUBMITTED                   |ACCEPTED




------- Additional Comments From mranweil@us.ibm.com  2005-04-05 01:20 EST -------
Yeah, seems to work for me on rhel4qu1, too. 

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