Bug 761968 (GLUSTER-236) - Stack overflow due to infinite recursion in glusterfs_glh_realpath
Summary: Stack overflow due to infinite recursion in glusterfs_glh_realpath
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-236
Product: GlusterFS
Classification: Community
Component: libglusterfsclient
Version: 2.0.6
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Raghavendra G
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-01 06:00 UTC by Raghavendra G
Modified: 2009-09-09 11:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

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.)


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