Bug 761968 (GLUSTER-236)

Summary: Stack overflow due to infinite recursion in glusterfs_glh_realpath
Product: [Community] GlusterFS Reporter: Raghavendra G <raghavendra>
Component: libglusterfsclientAssignee: Raghavendra G <raghavendra>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 2.0.6CC: gluster-bugs, shehjart
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Raghavendra G 2009-09-01 06:00:56 UTC
Test setup: apache-2.2 running on booster.

The client tried to access /usr/bin/xyz, which is a symbolic link with content "../../bin/xyz". while trimming to prev-dir on encountering the second ".." from end of the path string, the path constructed would be /usr/bin/. With the path terminating in a '/', libgf_trim_to_prev_dir trims the path to "/usr/bin/" itself causing an infinite recursion in glusterfs_glh_realpath.

Comment 1 Anand Avati 2009-09-08 07:22:59 UTC
PATCH: http://patches.gluster.com/patch/1203 in master (libglusterfsclient: handle paths terminating with '/' properly in libgf_trim_to_prev_dir.)

Comment 2 Anand Avati 2009-09-08 07:23:39 UTC
PATCH: http://patches.gluster.com/patch/1202 in release-2.0 (libglusterfsclient: handle paths terminating with '/' properly in libgf_trim_to_prev_dir.)