Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 162936

Summary: rgmanager segfaults with certain configurations using inheritance
Product: [Retired] Red Hat Cluster Suite Reporter: Lon Hohberger <lhh>
Component: rgmanagerAssignee: Lon Hohberger <lhh>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: cluster-maint, dwa, jbacik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
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: --- Target Upstream Version:
Description Flags
Fixes behavior none

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="">
                                        <nfsclient ref="kraid"/>               
                         <nfsclient ref="bowser"/>

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 +

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)

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.