Data Corruption bug with Samba's vfs_iouring and Linux 5.6.7/5.7rc3

Anoop C S anoopcs at cryptolab.net
Fri May 8 05:09:38 UTC 2020


On Thu, 2020-05-07 at 21:07 -0700, Jeremy Allison via samba-technical
wrote:
> On Thu, May 07, 2020 at 02:30:02PM -0700, Jeremy Allison wrote:
> > On Wed, May 06, 2020 at 03:53:26PM +0530, Anoop C S via samba-
> > technical wrote:
> > > > reproduce the issue.
> > > 
> > > I could reproduce the difference in SHA256 checksum after copying
> > > a
> > > directory with 100 copies of test file(provided by reporter) from
> > > io_uring VFS module enabled share using Windows explorer(right-
> > > click-
> > > > copy/paste). Only 5 out of 100 files had correct checksum after
> > > > copy
> > > operation :-/
> > 
> > Anoop,
> > 
> > I'm working on a fix for the vfs_io_uring module
> > to retry short reads/writes.
> > 
> > Do you still have your test environment so
> > you can test what I come up with ? I don't
> > have a reproducer here at home so I'll be
> > dependent on you to see if the fix works.
> 
> Anoop, here is a *MASSIVELY* prototype fix
> for the io_uring short read problem. It still
> is very ugly and contain extra debugs etc.
> 
> It works for me here if I enable the JRATEST
> code that forces short reads if read_len > 4096,
> but I never was able to reproduce the Windows
> issue (my kernel isn't modern enough).
> 
> Can you test it on your Windows environment
> and see if it fixes the SHA256 checksum problem
> after copying 100 test files ?

Your patch fixes mismatch in SHA256 checksum of 100 bin files copied
using Windows explorer in my environment.

> If so I'll fix it up to be production-ready,
> (for example I think I can get rid of the
> immediate event useage) fix the pwrite case
> and then cut it onto bite-sized reviewable chunks.
> 
> Cheers,
> 
> Jeremy.




More information about the samba-technical mailing list