Hi Guilluame,

I have successfully completed SSHD-639 that took care of an issue reported in 
SSHD-634 - namely the possibility of session decode buffer corruption due to 
re-using it in order to write the response. Just out of curiosity I applied it 
to 1.1 (with a few adjustments) and all tests pass.

You can view the changes in 
https://github.com/apache/mina-sshd/commit/f275a5217642a60582666c00a21ffde418c555c3.
 Basically, except for very few cases (e.g., SftpSubsystem where the input 
buffer is a new one every time and not being re-used by the main "run" loop 
after its data has been handled) no buffer re-use takes place. Furthermore, the 
session buffers are protected from such re-use by overriding their "clear" 
method, as well as making sure that any packet being sent to the session's 
"write" method(s) is not one of the session buffer instances. I have run all 
the unit tests successfully, so none of the code seems to re-use its buffer.

If you wish I can create a new branch in the master repository (let's call it 
1.1.1) and push the code to it so you can test it yourself. Then we can decide 
whether to release 1.1.1.

Lyor

Reply via email to