kio_sftp changes to fix reported and discovered data corruption bugs (please review)

Michael Pyne mpyne at
Sat Jan 5 04:21:12 UTC 2013


As indicated in the title I've committed a couple of changes ([1], [2]) to 
kio_sftp to fix some data corruption bugs in time for KDE 4.10.

The first is bug 312320 [3], which is where an extra 61440 bytes are added to 
files that are downloaded and have a size that is an exact multiple of 61440 
bytes. I was able to reproduce and although I'm still mystified as to the 
exact sequence of errors leading to the corrupt file, I can confirm the 
reporter's proposed fix seems to work.

In the sequence of trying to figure out why the fix work I dove into the 
libssh source code and to cut a long story short, it's not a good idea to mix 
the "async read setup" and "async read perform" calls, which kio_sftp 
currently does. It's more of a theoretical concern but if this bug is 
triggered the data corruption will be much more difficult to notice for a user 
who isn't using checksums or cryptographic hashes. The commit log entries have 
more details for both.

I'm very confident that both changes are at the very least no worse than what 
was present before given how near we are to 4.10 but I wanted to post the 
heads-up to the list in case it is decided to revert and aim for 4.10.1 

 - Michael Pyne

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the release-team mailing list