Bug 162936 - rgmanager segfaults with certain configurations using inheritance
rgmanager segfaults with certain configurations using inheritance
Product: Red Hat Cluster Suite
Classification: Red Hat
Component: rgmanager (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Lon Hohberger
Cluster QE
Depends On:
  Show dependency treegraph
Reported: 2005-07-11 14:26 EDT by Lon Hohberger
Modified: 2009-04-16 16:17 EDT (History)
3 users (show)

See Also:
Fixed In Version: RHBA-2005-738
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-07 12:52:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
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 14:28 EDT, Lon Hohberger
no flags Details | Diff

  None (edit)
Description Lon Hohberger 2005-07-11 14:26:25 EDT
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 14:28:08 EDT
Created attachment 116615 [details]
Fixes behavior

This patch fixes the behavior.
Comment 2 Lon Hohberger 2005-07-12 11:35:27 EDT
Patches in upstream CVS
Comment 4 Red Hat Bugzilla 2005-10-07 12:52:38 EDT
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.


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