Bug 1491178

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.12CC: bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-glusterfs-3.12.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1490897 Environment:
Last Closed: 2017-10-13 12:46:24 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: 1491574    

Description Xavi Hernandez 2017-09-13 09:03:54 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:18:37 UTC
REVIEW: https://review.gluster.org/18280 (glusterd: fix invalid memory reference returned) posted (#1) for review on release-3.12 by Xavier Hernandez (xhernandez)

Comment 2 Worker Ant 2017-10-04 13:41:13 UTC
REVIEW: https://review.gluster.org/18280 (glusterd: fix invalid memory reference returned) posted (#2) for review on release-3.12 by Xavier Hernandez (jahernan)

Comment 3 Worker Ant 2017-10-05 12:35:58 UTC
REVIEW: https://review.gluster.org/18280 (glusterd: fix invalid memory reference returned) posted (#3) for review on release-3.12 by Xavier Hernandez (jahernan)

Comment 4 Worker Ant 2017-10-05 12:43:15 UTC
REVIEW: https://review.gluster.org/18280 (glusterd: fix invalid memory reference returned) posted (#4) for review on release-3.12 by Xavier Hernandez (jahernan)

Comment 5 Worker Ant 2017-10-05 12:45:05 UTC
REVIEW: https://review.gluster.org/18280 (glusterd: fix invalid memory reference returned) posted (#5) for review on release-3.12 by Xavier Hernandez (jahernan)

Comment 6 Worker Ant 2017-10-05 12:47:49 UTC
REVIEW: https://review.gluster.org/18280 (glusterd: fix invalid memory reference returned) posted (#6) for review on release-3.12 by Xavier Hernandez (jahernan)

Comment 7 Worker Ant 2017-10-10 05:35:10 UTC
COMMIT: https://review.gluster.org/18280 committed in release-3.12 by jiffin tony Thottan (jthottan) 
------
commit a4fea86c5203838422f5e3bc4c764a0c655392ee
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: 1491178
    Signed-off-by: Xavier Hernandez <xhernandez>

Comment 8 Jiffin 2017-10-13 12:46:24 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-glusterfs-3.12.2, please open a new bug report.

glusterfs-glusterfs-3.12.2 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/gluster-users/2017-October/032684.html
[2] https://www.gluster.org/pipermail/gluster-users/