mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldstein Lyor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-605) VirtualFileSystemFactory allows escaping from root
Date Wed, 13 Apr 2016 16:59:25 GMT

    [ https://issues.apache.org/jira/browse/SSHD-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15239598#comment-15239598
] 

Goldstein Lyor commented on SSHD-605:
-------------------------------------

Fixed it see [a1699d1f|https://github.com/apache/mina-sshd/commit/9fb39d224ecb24467e5497950973ccf3a1699d1f]
and added a test. [~codeandcodes@gmail.com] thanks for the diagnosis and hint as to the problem
- it was, as you said, due to not normalizing the resolved path. Please get latest version
from _Github_ and re-test.

> VirtualFileSystemFactory allows escaping from root
> --------------------------------------------------
>
>                 Key: SSHD-605
>                 URL: https://issues.apache.org/jira/browse/SSHD-605
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>         Environment: Windows, JDK 7
>            Reporter: Damien B
>            Assignee: Goldstein Lyor
>              Labels: security
>             Fix For: 1.1.0, 1.3.0
>
>
> Possibly Windows only.
> I start a SFTP server like this:
> sshd = SshServer.setUpDefaultServer();
> [...]
> sshd.setFileSystemFactory(new VirtualFileSystemFactory(myRootDir.getCanonicalPath()));
> [...]
> sshd.setSubsystemFactories(Arrays.<NamedFactory<Command>>asList(new SftpSubsystemFactory()));
> I connect to the server with FileZilla.
> Upon connexion, the files in myRooDir correctly appear under the server path '/'. But
if I cd to '/c:/Windows/', the files in C:\Windows\ appear, escaping the VFS root.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message