[Bugs] [Bug 1163920] New: Glusterd segfaults on gluster volume status ... detail

bugzilla at redhat.com bugzilla at redhat.com
Thu Nov 13 17:17:46 UTC 2014


https://bugzilla.redhat.com/show_bug.cgi?id=1163920

            Bug ID: 1163920
           Summary: Glusterd segfaults  on gluster volume status ...
                    detail
           Product: GlusterFS
           Version: 3.6.0
         Component: glusterd
          Severity: medium
          Assignee: bugs at gluster.org
          Reporter: petr.medonos at etnetera.cz
                CC: bugs at gluster.org, gluster-bugs at redhat.com



Created attachment 957232
  --> https://bugzilla.redhat.com/attachment.cgi?id=957232&action=edit
Glusterd coredump

Description of problem:
Issuing ‘gluster volume status … detail’ command segfaults the glusterd daemon
if the underlying bricks use filesystems unknown to gluster (in our case it was
a mountbind, which has type of ‘none’).

The problem seems to be in xlators/mgmt/glusterd/src/glusterd-utils.c, in
function glusterd_add_inode_size_to_dict,  on line 7296 - the loop iterates
over ‘fs’, not ‘glusterd_fs’, therefore ‘glusterd_fs->fs_type_name’ is always
‘xfs’ and fs gets out of bounds, causing the SIGSEGV in strcmp on line 7297. 

--- glusterd-utils.c    2014-11-07 11:55:30.000000000 +0100
+++ glusterd-utils.c_new        2014-11-13 18:09:06.864317759 +0100
@@ -7293,7 +7293,7 @@
         runinit (&runner);
         runner_redir (&runner, STDOUT_FILENO, RUN_PIPE);

-        for (fs = glusterd_fs ; glusterd_fs->fs_type_name; fs++) {
+        for (fs = glusterd_fs ; fs->fs_type_name; fs++) {
                 if (strcmp (fs_name, fs->fs_type_name) == 0) {
                         snprintf (fs_tool_name, sizeof fs_tool_name,
                                   "/usr/sbin/%s", fs->fs_tool_name);

Version-Release number of selected component (if applicable):
3.6.1 from official glusterfs yum repository (Centos 6)

How reproducible:
Use filesystem not present in fs_info struct for bricks, for example mountbind,
which has type ‘none’.

Steps to Reproduce:
1. mount directory for bricks as mountbinds
2. create and start GlusterFS volume
3. execute gluster volume status ... detail command

Actual results:
Glusterd crashes with SIGSEGV.

Expected results:
No crash :)

Additional info:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list