Bug 162936 - rgmanager segfaults with certain configurations using inheritance
Summary: rgmanager segfaults with certain configurations using inheritance
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Cluster Suite
Classification: Retired
Component: rgmanager   
(Show other bugs)
Version: 4
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Lon Hohberger
QA Contact: Cluster QE
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-07-11 18:26 UTC by Lon Hohberger
Modified: 2009-04-16 20:17 UTC (History)
3 users (show)

Fixed In Version: RHBA-2005-738
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-07 16:52:38 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fixes behavior (1.84 KB, patch)
2005-07-11 18:28 UTC, Lon Hohberger
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:738 normal SHIPPED_LIVE rgmanager bug fix update 2005-10-07 04:00:00 UTC

Description Lon Hohberger 2005-07-11 18:26:25 UTC
Description of problem:

                <service autostart="1" domain="gfsnfs" name="NFS">
                        <nfsexport ref="gfs_nfs_export">
                                <clusterfs ref="gfs"/>
                                <ip ref="10.10.1.31">
                                        <nfsclient ref="kraid"/>               
                         <nfsclient ref="bowser"/>
                                </ip>
                        </nfsexport>
                </service>

The above configuration snippet tries to evaluate <nfsexport> for a file system.

Now, ordinarily, the nfsexport resource inherits the path from the parent file
system.  However, because the parent is actually a service resource, there is no
path to inherit.  When we execute this code:

		val = attr_value(node, res->r_attrs[x].ra_name);

		/* Strlen of both + '=' + 'OCF_RESKEY' + '\0' terminator' */
		n = strlen(res->r_attrs[x].ra_name) + strlen(val) + 2 +
			strlen(OCF_RES_PREFIX);

attr_value tries to find the inheritance for the attribute, correctly returning
NULL if none is available.  However, the next call to strlen() raises a segfault
is val is NULL.  Thus, the correct code should be:

		val = attr_value(node, res->r_attrs[x].ra_name);
		if (!val)
			continue;

Version-Release number of selected component (if applicable): Current stable, CVS.


How reproducible: ?

  
Actual results:

rgmanager segfaults and freezes.


Expected results:

*no* configuration should cause rgmanager to segfault.

Comment 1 Lon Hohberger 2005-07-11 18:28:08 UTC
Created attachment 116615 [details]
Fixes behavior

This patch fixes the behavior.

Comment 2 Lon Hohberger 2005-07-12 15:35:27 UTC
Patches in upstream CVS


Comment 4 Red Hat Bugzilla 2005-10-07 16:52:38 UTC
An advisory 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-2005-738.html



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