Bug 1311407 - glusterfs : fix double free possibility in the code
Summary: glusterfs : fix double free possibility in the code
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: 3.7.9
Hardware: All
OS: All
medium
medium
Target Milestone: ---
Assignee: Jiffin
QA Contact:
URL:
Whiteboard:
Depends On: 1247603
Blocks: glusterfs-3.7.9
TreeView+ depends on / blocked
 
Reported: 2016-02-24 08:01 UTC by Jiffin
Modified: 2016-09-01 09:32 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.7.15
Doc Type: Bug Fix
Doc Text:
Clone Of: 1247603
Environment:
Last Closed: 2016-09-01 09:20:35 UTC
Regression: ---
Mount Type: All
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jiffin 2016-02-24 08:01:55 UTC
+++ This bug was initially created as a clone of Bug #1247603 +++

Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Anand Avati on 2015-07-28 08:19:47 EDT ---

REVIEW: http://review.gluster.org/11775 (libglusterfs : assigning the pointer to NULL after freeing it) posted (#1) for review on master by jiffin tony Thottan (jthottan)

--- Additional comment from Vijay Bellur on 2016-02-16 04:44:42 EST ---

REVIEW: http://review.gluster.org/11775 (libglusterfs : assigning the pointer to NULL after freeing it) posted (#2) for review on master by jiffin tony Thottan (jthottan)

--- Additional comment from Vijay Bellur on 2016-02-22 07:01:58 EST ---

REVIEW: http://review.gluster.org/13483 (gfapi : Avoid double freeing of dict in glfs_h_getxattrs()) posted (#1) for review on master by jiffin tony Thottan (jthottan)

--- Additional comment from Vijay Bellur on 2016-02-23 05:24:06 EST ---

REVIEW: http://review.gluster.org/13483 (gfapi : Avoid double freeing of dict in glfs_*_*getxattr) posted (#2) for review on master by jiffin tony Thottan (jthottan)

--- Additional comment from Vijay Bellur on 2016-02-23 13:44:04 EST ---

COMMIT: http://review.gluster.org/13483 committed in master by Niels de Vos (ndevos) 
------
commit f3c48b4a729a56ad6e6d9b2ac0b08ce1ec0f3fc3
Author: Jiffin Tony Thottan <jthottan>
Date:   Mon Feb 22 17:20:58 2016 +0530

    gfapi : Avoid double freeing of dict in glfs_*_*getxattr
    
    The dict variable "xattr" is passed to glfs_getxattr_process() and
    glfs_listxattr_process() in glfs_*_*getxattrs(). This variable is
    unrefed by both functions and again in caller function which may
    result in segfault. So it is wrong to call dict_unref() in both
    glfs_*xattr_process functions.
    
    Change-Id: I227f55ebc3169f58910863c04ae536a8d789e80e
    BUG: 1247603
    Signed-off-by: Jiffin Tony Thottan <jthottan>
    Reviewed-on: http://review.gluster.org/13483
    Smoke: Gluster Build System <jenkins.com>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Reviewed-by: Niels de Vos <ndevos>

Comment 1 Vijay Bellur 2016-02-24 09:09:13 UTC
REVIEW: http://review.gluster.org/13505 (gfapi : Avoid double freeing of dict in glfs_*_*getxattr) posted (#1) for review on release-3.7 by jiffin tony Thottan (jthottan)

Comment 2 Mike McCune 2016-03-28 22:50:27 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 3 Vijay Bellur 2016-08-01 09:23:12 UTC
REVIEW: http://review.gluster.org/13505 (gfapi : Avoid double freeing of dict in glfs_*_*getxattr) posted (#2) for review on release-3.7 by jiffin tony Thottan (jthottan)

Comment 4 Vijay Bellur 2016-08-01 09:36:03 UTC
REVIEW: http://review.gluster.org/13505 (gfapi : Avoid double freeing of dict in glfs_*_*getxattr) posted (#3) for review on release-3.7 by Oleksandr Natalenko (oleksandr)

Comment 5 Vijay Bellur 2016-08-03 11:25:00 UTC
COMMIT: http://review.gluster.org/13505 committed in release-3.7 by Niels de Vos (ndevos) 
------
commit 102b565fd867b7ef721b481aeb6c8c39d904ecec
Author: Jiffin Tony Thottan <jthottan>
Date:   Mon Feb 22 17:20:58 2016 +0530

    gfapi : Avoid double freeing of dict in glfs_*_*getxattr
    
    The dict variable "xattr" is passed to glfs_getxattr_process() and
    glfs_listxattr_process() in glfs_*_*getxattrs(). This variable is
    unrefed by both functions and again in caller function which may
    result in segfault. So it is wrong to call dict_unref() in both
    glfs_*xattr_process functions.
    
    Backport reference :
    >Change-Id: I227f55ebc3169f58910863c04ae536a8d789e80e
    >BUG: 1247603 Signed-off-by: Jiffin Tony Thottan <jthottan>
    >Reviewed-on: http://review.gluster.org/13483
    >Smoke: Gluster Build System <jenkins.com>
    >NetBSD-regression: NetBSD Build System <jenkins.org>
    >CentOS-regression: Gluster Build System <jenkins.com>
    >Reviewed-by: Niels de Vos <ndevos>
    
    Change-Id: I2e574ff4b7a095749540bdb9d3593bc1d6275e56
    BUG: 1311407
    Signed-off-by: Jiffin Tony Thottan <jthottan>
    Signed-off-by: Oleksandr Natalenko <oleksandr>
    Reviewed-on: http://review.gluster.org/13505
    Reviewed-by: Prashanth Pai <ppai>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Niels de Vos <ndevos>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 6 Kaushal 2016-09-01 09:20:35 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.7.15, please open a new bug report.

glusterfs-3.7.15 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] https://www.gluster.org/pipermail/gluster-devel/2016-September/050714.html
[2] https://www.gluster.org/pipermail/gluster-users/

Comment 7 Kaushal 2016-09-01 09:32:51 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.7.15, please open a new bug report.

glusterfs-3.7.15 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] https://www.gluster.org/pipermail/gluster-devel/2016-September/050714.html
[2] https://www.gluster.org/pipermail/gluster-users/


Note You need to log in before you can comment on or make changes to this bug.