[Bugs] [Bug 1240524] configuration.so seems to be missing

bugzilla at redhat.com bugzilla at redhat.com
Wed Jul 8 19:01:42 UTC 2015


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

Kaleb KEITHLEY <kkeithle at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|kkeithle at redhat.com         |kparthas at redhat.com



--- Comment #1 from Kaleb KEITHLEY <kkeithle at redhat.com> ---
"Missing" library is a red herring. Crash is due to a buffer overflow.

This is the patch I used for the Fedora and EPEL koji builds. It could stand
some more improvement, not just in 3.5.x but all later branches.

--- glusterfs-3.5.5/xlators/mgmt/glusterd/src/glusterd-volgen.c.orig   
2015-07-08 14:27:52.386643601 -0400
+++ glusterfs-3.5.5/xlators/mgmt/glusterd/src/glusterd-volgen.c    2015-07-08
14:32:44.137643601 -0400
@@ -1982,7 +1982,8 @@
         int                      ret = -1;
         char                    *def_val = NULL;
         char                    *descr = NULL;
-        char                     output_string[25600] = {0, };
+        char                     output_string[51200] = {0, };
+        size_t                   len_output_string = 0;
         char                    *output = NULL;
         char                     tmp_str[2048] = {0, };
 #if (HAVE_LIB_XML)
@@ -2046,10 +2047,12 @@
                         gf_log ("glusterd", GF_LOG_ERROR, "Libxml not
present");
 #endif
                 } else {
-                        snprintf (tmp_str, sizeof (tmp_str), "Option:
%s\nDefault "
+                        len_output_string += 
+                              snprintf (tmp_str,sizeof (tmp_str), "Option:
%s\nDefault "
                                         "Value: %s\nDescription: %s\n\n",
                                         vme->key, def_val, descr);
-                        strcat (output_string, tmp_str);
+                        if (len_output_string < sizeof output_string)
+                                strcat (output_string, tmp_str);
                 }
 cont:
                 if (dl_handle) {

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=XHKM1chm0O&a=cc_unsubscribe


More information about the Bugs mailing list