[
https://issues.apache.org/jira/browse/SSHD-634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15125338#comment-15125338
]
Goldstein Lyor commented on SSHD-634:
-------------------------------------
First of all - wait for version 1.1 to see (even though the specific code you
mention is basically unchanged). In any case, it should take more than a
suspicion - when the code reaches the method you mention the buffer can be
safely re-used - there is no multi-threading issue that I am aware of. Please
try (if you can) to create a unit test that exposes the problem (if indeed it
is such).
> Suspicious read buffer re-use in write command
> ----------------------------------------------
>
> Key: SSHD-634
> URL: https://issues.apache.org/jira/browse/SSHD-634
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 1.0.0
> Reporter: Eugene Petrenko
>
> From time to time I saw a {{Bad packet length ###}} errors from SSH clients
> that calls commands to the SSHD server running with Apache SSHD.
> It may turn out there are some issues in the implementation.
> I found one suspicious usage of buffers around
> {{org.apache.sshd.common.channel.AbstractChannel#sendResponse}} method. As
> far as I see from the code it uses the read buffer as a place to generate a
> write packet command. Maybe it's worth to create a fresh buffer here to avoid
> it be updated from the other thread while it is put to a write queue
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)