[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] sftp: Avoid race condition reading incomplete data messages

On Sunday, 26 August 2018 21:58:39 CEST Jakub Jelen wrote:
> Hi list,

Hi Jakub,

> This changes amends f561e6bcb361999088fe377f750dbacbc5e0102f which
> introduces same check in one place, but miss it in other two places.
> We encountered this issue with qemu using SFTP to transfer large
> data chunks and in some cases, the file transfer was interrupted
> without any reason. From the debug messages, it showed up that
> last part of data message/packet was not handled in the time
> of the sftp_read() call, therefore the ssh_channel_read() returned
> zero (there was no more data to read yet), which made the whole
> transfer fail hard instead of retrying later.
> The proposed change is reusing the code from previously referenced
> commit also in the other places.

good catch! Very well done. Thanks.


Andreas Schneider                 asn@xxxxxxxxxxxxxx
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D

[PATCH] sftp: Avoid race condition reading incomplete data messagesJakub Jelen <jjelen@xxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org