Bug 1704 - It is possible to change to non-existent directory with a trailing ".."
Summary: It is possible to change to non-existent directory with a trailing ".."
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: smbmount (unmaintained) (show other bugs)
Version: 3.0.6
Hardware: All Linux
: P3 major
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-01 06:56 UTC by Jyrki Muukkonen
Modified: 2005-02-17 10:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jyrki Muukkonen 2004-09-01 06:56:17 UTC
With samba server version 3.0.x it is possible to change working directory to
"bogus.." for example. Anything with two trailing dots triggers this "feature".

Sample output with 3.0.6 client and 3.0.4 server:
[jvtm@cruxie /smbmount] mkdir tempdir
[jvtm@cruxie /smbmount] cd tempdir/
[jvtm@cruxie /smbmount/tempdir] ls -l
total 0
[jvtm@cruxie /smbmount/tempdir] cd bogus..
[jvtm@cruxie /smbmount/tempdir/bogus..] ls -l
total 524288
drwxr-xr-x  1 jvtm users 0 Sep  1  2004 tempdir
[jvtm@cruxie /smbmount/tempdir/bogus..] cd very.../weird../indeed..../,..
[jvtm@cruxie /smbmount/tempdir/bogus../very.../weird../indeed..../,..] pwd
/smbmount/tempdir/bogus../very.../weird../indeed..../,..

This has been confirmed with several systems, including CRUX, Debian and some
Redhatish installations.

It looks like the error is somewhere in the server side code since I'm not able
to do this with samba 2.x mounts (not sure of the server version).
Comment 1 Gerald (Jerry) Carter (dead mail address) 2005-02-17 10:02:34 UTC
sorry.  We don't support smbfs.  You'll have to talk to the 
kernel maintainers.  Although you moght want to test out the 
cifs fs in the 2.6 linux kernel.
Http://www.samba.org/samba/download/