mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-848) Possible bug opening local port forwarding channel
Date Tue, 09 Oct 2018 07:43:00 GMT

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

ASF GitHub Bot commented on SSHD-848:
-------------------------------------

GitHub user robertodeandrea opened a pull request:

    https://github.com/apache/mina-sshd/pull/68

    SSHD-848 Problem opening local port forwarding channel

    This is our proposed code change to handle problem reported in SSHD-848.
    I'll wait your comments.
    
    Regards
    Roberto


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/robertodeandrea/mina-sshd master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/mina-sshd/pull/68.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #68
    
----
commit 9f2d49a97963d9f4330d96578142d67e06b44c07
Author: roberto.deandrea <roberto.deandrea@...>
Date:   2018-10-09T07:37:46Z

    SSHD-848 Proposed change code

----


> Possible bug opening local port forwarding channel
> --------------------------------------------------
>
>                 Key: SSHD-848
>                 URL: https://issues.apache.org/jira/browse/SSHD-848
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Roberto Deandrea
>            Priority: Major
>         Attachments: testlpf.ko, testlpf.ok
>
>
> Hi , We found a possible bug opening a local port forwarding channel.
> Scenario : The SSH client and server are based on Apache SSHD 2.0.1. There is a FTP client
sending a file through a local port forwarding channel to a target server.
> The problem manifests when the SSH server is busy and returns the SSH_MSG_CHANNEL_OPEN_CONFIRMATION
with a some delay and the client is very fast to send only a few bytes on a local port forwarding
channel.
> The outcome is the FTP client is NOT able to send bytes through the channel to the target
server.
> Into SSH client traces we see :
> org.apache.sshd.common.channel.WindowClosedException: Already closed: Window[client/remote](TcpipClientChannel[id=4,
recipient=4]-ClientSessionImpl[roberto@/192.168.50.61:10022])
>  
> According to us there is a chance that if we don't AWAIT the local port forward channel
is TOTALLY opened, when the client is very fast to send bytes... it closes its connection,
ao the channel that is already closing prevents bytes to flow through the channel to the target
server.
>  
> We guess there is a code bug in *DefaultForwardingFilter.sessionCreated()* method.
> We add the following line at the end of the method and the problem seems definitely fixed.
>             *channel.getOpenFuture().await();*
>  
> Please, can you troubleshoot this issue and comment about our potential code fix ?
> Thanks in advance.
>  
> I attached  the files:
> testslpf.ko SSH client traces with original code and a failed attempt
> testslpf.ok SSH client traces with our code changes and a successful attempt
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message