Bug 1491166

Summary: GlusterD returns a bad memory pointer in glusterd_get_args_from_dict()
Product: [Community] GlusterFS Reporter: Xavi Hernandez <jahernan>
Component: glusterdAssignee: Xavi Hernandez <jahernan>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.10CC: bugs, srangana
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.10.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1490897 Environment:
Last Closed: 2017-10-06 17:11:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1490897    
Bug Blocks: 1480863    

Description Xavi Hernandez 2017-09-13 08:38:30 UTC
+++ This bug was initially created as a clone of Bug #1490897 +++

Description of problem:

glusterd_get_args_from_dict() creates a new dict from unserialization of the data coming from getspec. From there it extracts 'brick_name' and stores the pointer to argument brick_name (a char **). Just before returning, dict is released, deallocating all related data, including the string pointer by brick_name.

Version-Release number of selected component (if applicable): mainline


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Worker Ant 2017-09-14 06:20:04 UTC
REVIEW: https://review.gluster.org/18281 (glusterd: fix invalid memory reference returned) posted (#1) for review on release-3.10 by Xavier Hernandez (xhernandez)

Comment 2 Worker Ant 2017-09-17 12:57:53 UTC
COMMIT: https://review.gluster.org/18281 committed in release-3.10 by Shyamsundar Ranganathan (srangana) 
------
commit d31c45e659d0fd0b740ecfb98b3b92dc8dcca039
Author: Xavier Hernandez <xhernandez>
Date:   Tue Sep 12 14:53:41 2017 +0200

    glusterd: fix invalid memory reference returned
    
    > BUG: 1490897
    > Reviewed-on: https://review.gluster.org/18263
    > Smoke: Gluster Build System <jenkins.org>
    > CentOS-regression: Gluster Build System <jenkins.org>
    > Reviewed-by: Jeff Darcy <jeff.us>
    > Reviewed-by: Gaurav Yadav <gyadav>
    
    Change-Id: I0823c7b33060b48040c1d86ad346a5f6e15bc190
    BUG: 1491166
    Signed-off-by: Xavier Hernandez <xhernandez>
    Reviewed-on: https://review.gluster.org/18281
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jeff.us>

Comment 3 Shyamsundar 2017-10-06 17:11:53 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.10.6, please open a new bug report.

glusterfs-3.10.6 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2017-October/000084.html
[2] https://www.gluster.org/pipermail/gluster-users/