Bug 1080295

Summary: features/gfid-access: Possible inode memory corruption issue.
Product: [Community] GlusterFS Reporter: Kotresh HR <khiremat>
Component: coreAssignee: Kotresh HR <khiremat>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, gluster-bugs
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.6.0beta1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-11 08:29:08 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:

Description Kotresh HR 2014-03-25 06:06:32 UTC
Description of problem:

The lookup in gfid access translator does not ref the inode if its
already looked up. So there is a possibility that this inode may
be freed and leads to memory corruption issues.

Reproduced ?
No. Found through code walk through.


Actual results:
May end up using inode structure which is freed.

Expected results:
Should ref and unref inode when being used.

Comment 1 Anand Avati 2014-03-25 06:07:35 UTC
REVIEW: http://review.gluster.org/7329 (features/gfid-access: Fix possible inode memory corrution.) posted (#1) for review on master by Kotresh HR (khiremat)

Comment 2 Anand Avati 2014-03-25 06:07:56 UTC
REVIEW: http://review.gluster.org/7329 (features/gfid-access: Fix possible inode memory corruption.) posted (#2) for review on master by Kotresh HR (khiremat)

Comment 3 Anand Avati 2014-03-26 05:18:44 UTC
REVIEW: http://review.gluster.org/7329 (features/gfid-access: Fix possible inode memory corrution.) posted (#3) for review on master by Kotresh HR (khiremat)

Comment 4 Anand Avati 2014-03-26 09:54:41 UTC
REVIEW: http://review.gluster.org/7329 (features/gfid-access: Fix possible inode memory corrution.) posted (#4) for review on master by Kotresh HR (khiremat)

Comment 5 Anand Avati 2014-03-29 12:43:58 UTC
REVIEW: http://review.gluster.org/7329 (features/gfid-access: Fix possible inode memory corruption.) posted (#5) for review on master by Vijay Bellur (vbellur)

Comment 6 Anand Avati 2014-04-03 16:36:59 UTC
COMMIT: http://review.gluster.org/7329 committed in master by Vijay Bellur (vbellur) 
------
commit 997c89b6172116557f981510a94232486ec526b0
Author: Kotresh H R <khiremat>
Date:   Tue Mar 25 11:11:41 2014 +0530

    features/gfid-access: Fix possible inode memory corruption.
    
            During lookup, the inode is not ref'd. Added code
            to ref the inode in call path and unref in cbk path.
            Also fixed a case where we should always be putting
            linked inode into context as it is not guaranteed
            that we get same inode that we passed in a call to
            inode_link.
    
    Change-Id: Iaec083a9258658bef3047e83956729d3dbcd9a59
    BUG: 1080295
    Signed-off-by: Kotresh H R <khiremat>
    Reviewed-on: http://review.gluster.org/7329
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra G <rgowdapp>
    Reviewed-by: Venky Shankar <vshankar>

Comment 7 Niels de Vos 2014-09-22 12:37:10 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 8 Niels de Vos 2014-11-11 08:29:08 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.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [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://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users