Bug 1490897

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: mainlineCC: bugs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.13.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1491166 1491178 (view as bug list) Environment:
Last Closed: 2017-12-08 17:40: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:    
Bug Blocks: 1491166, 1491178    

Description Xavi Hernandez 2017-09-12 12:44:02 UTC
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-12 12:55:09 UTC
REVIEW: https://review.gluster.org/18263 (glusterd: fix invalid memory reference returned) posted (#1) for review on master by Xavier Hernandez (xhernandez)

Comment 2 Worker Ant 2017-09-12 13:03:47 UTC
REVIEW: https://review.gluster.org/18263 (glusterd: fix invalid memory reference returned) posted (#2) for review on master by Xavier Hernandez (xhernandez)

Comment 3 Worker Ant 2017-09-13 20:02:37 UTC
COMMIT: https://review.gluster.org/18263 committed in master by Jeff Darcy (jeff.us) 
------
commit 2ec0dfe76780a8f82f4f6f8b7b3fdfd54203b616
Author: Xavier Hernandez <xhernandez>
Date:   Tue Sep 12 14:53:41 2017 +0200

    glusterd: fix invalid memory reference returned
    
    Change-Id: I0823c7b33060b48040c1d86ad346a5f6e15bc190
    BUG: 1490897
    Signed-off-by: Xavier Hernandez <xhernandez>
    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>

Comment 4 Shyamsundar 2017-12-08 17:40: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.13.0, please open a new bug report.

glusterfs-3.13.0 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-December/000087.html
[2] https://www.gluster.org/pipermail/gluster-users/