Bug 88533 - LTC2500 - lokkit crashes if too many ethernet devices
Summary: LTC2500 - lokkit crashes if too many ethernet devices
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: redhat-config-securitylevel
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: David Lawrence
URL:
Whiteboard:
: 108956 (view as bug list)
Depends On:
Blocks: 116727
TreeView+ depends on / blocked
 
Reported: 2003-04-10 18:21 UTC by Mike Ranweiler
Modified: 2007-11-30 22:06 UTC (History)
4 users (show)

Fixed In Version: 0.50-23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-17 12:01:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:353 0 normal SHIPPED_LIVE Updated redhat-config-securitylevel package fixes crash 2004-09-02 04:00:00 UTC

Description Mike Ranweiler 2003-04-10 18:21:13 UTC
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 16:28:15 UTC
------- 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 20:04:39 UTC
fixed in -23.

Comment 3 Mike Ranweiler 2003-07-31 19:09:49 UTC
------ Additional Comments From tabieste.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 19:14:59 UTC
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 23:17:32 UTC
------ Additional Comments From mranweil.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 16:29:03 UTC
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-22 02:00:02 UTC
I'll check out the second patch soon...

Comment 8 IBM Bug Proxy 2003-09-26 14:36:13 UTC
------ Additional Comments From khoa.com  2003-26-09 00:28 -------
Mike - any update on this bug ? 

Comment 9 IBM Bug Proxy 2003-10-16 00:47:24 UTC
------ Additional Comments From khoa.com  2003-15-10 18:59 -------
Any update on this bug ? 

Comment 10 IBM Bug Proxy 2003-10-16 00:48:02 UTC
------ Additional Comments From mranweil.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 20:41:37 UTC
*** Bug 108956 has been marked as a duplicate of this bug. ***

Comment 12 mark wisner 2003-11-25 11:04:05 UTC
------ Additional Comments From khoa.com  2003-25-11 02:24 -------
Mike - any update on this bug ? 

Comment 13 IBM Bug Proxy 2004-01-24 04:48:08 UTC
----- Additional Comments From khoa.com  2004-01-23 10:01 -------
Mark will check if this is still supported by Red Hat. 

Comment 14 IBM Bug Proxy 2004-01-24 04:57:35 UTC
----- Additional Comments From khoa.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 19:03:50 UTC
----- Additional Comments From mranweil.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 20:43:37 UTC
----- Additional Comments From khoa.com  2004-01-30 15:31 -------
I've put this on RHEL3 Update3 list as a Sev2. 

Comment 21 Brent Fox 2004-06-29 15:24:41 UTC
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 12:01:01 UTC
Fix confirmed with redhat-config-securitylevel-1.2.9-2.  Closing out.

Comment 26 Jay Turner 2004-09-02 04:19:23 UTC
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 14:21:51 UTC
----- Additional Comments From pbowen.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 14:32:40 UTC
----- Additional Comments From pbowen.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-25 03:41:19 UTC
---- Additional Comments From gaoming.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 22:24:49 UTC
changed:

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




------- Additional Comments From yongwenw.com  2005-04-04 18:20 EST -------
Close based on comment #24. 

Comment 31 IBM Bug Proxy 2005-04-04 22:25:10 UTC
---- Additional Comments From yongwenw.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 05:23:50 UTC
changed:

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




------- Additional Comments From mranweil.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.