samba-bugs at samba.org
2013-May-17 03:50 UTC
[Bug 9894] New: Rsync can silently zero out chunks in a file
https://bugzilla.samba.org/show_bug.cgi?id=9894 Summary: Rsync can silently zero out chunks in a file Product: rsync Version: 3.0.9 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P5 Component: core AssignedTo: wayned at samba.org ReportedBy: an.m at outlook.com QAContact: rsync-qa at samba.org map_ptr() handles read failures by zeroing out remaining chunk and returning the partially filled/all zero buffers to callers. It also fills error details in map_struct->status. It is caller's responsibility to check the status and handle this condition appropriately. It is probably OK to ignore this when we are generating checksums (as it might lead to a false mismatch, resulting in transfer of a non matching block) But in context of transfer (send_deflated_token()) when this error is ignored it leads to silent data corruption for receiver. Possible solutions are to log errors and disconnect such connection, or retry till timeout happens. No point in giving user a false impression that xfr is successful. Request dev to look at it with priority. Cheers, Ankur -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2013-May-19 18:50 UTC
[Bug 9894] Rsync can silently zero out chunks in a file
https://bugzilla.samba.org/show_bug.cgi?id=9894 Wayne Davison <wayned at samba.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #1 from Wayne Davison <wayned at samba.org> 2013-05-19 18:50:19 UTC --- Rsync marks a file with a read error with a checksum that doesn't match the file content so that the receiver knows that the file it generated is not valid. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
samba-bugs at samba.org
2013-May-20 12:41 UTC
[Bug 9894] Rsync can silently zero out chunks in a file
https://bugzilla.samba.org/show_bug.cgi?id=9894 --- Comment #2 from Ankur Mishra <an.m at outlook.com> 2013-05-20 12:41:31 UTC --- (In reply to comment #1)> Rsync marks a file with a read error with a checksum that doesn't match the > file content so that the receiver knows that the file it generated is not > valid.Thanks for your response Wayne. Apologies for long comment below, but it would be really helpful if you could go through it. My setup is rsyncd on one machine (source of a file), and rsync client on another machine (destination). When this happens (checksum mismatch due to read failure) does receiver (destination) throw an error? What I see is that receiver is not retuning an error code. From receiver point of view this looks like a success. I have tested this with both with and without --checksum with fresh sync (i.e., receiver didn't have the file) This is the experiment I did: 1. Ran rsyncd on one machine 2. Modified the rsyncd map_ptr() to mimic read failures 3. Ran rsync from a different machine 4. I could see rsync returning without any error, and a partially zeroed out file (of same length) 5. I observed same symptoms as #4 on a flash based embedded system during i/o stress on server side. Is there any specific option I should be using while running rsync to catch checksum errors? Thanks, Ankur -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.