Re: slab-out-of-bounds in iov_iter_revert()

2020-09-17 Thread Qian Cai
On Thu, 2020-09-17 at 19:45 +0100, Al Viro wrote: > On Thu, Sep 17, 2020 at 01:42:44PM -0400, Qian Cai wrote: > > > How much IO does it take to trigger that on your reproducer? > > > > That is something I don't know for sure because it is always reproducible by > > running the trinity fuzzer for

Re: slab-out-of-bounds in iov_iter_revert()

2020-09-17 Thread Qian Cai
On Thu, 2020-09-17 at 17:44 +0100, Al Viro wrote: > On Thu, Sep 17, 2020 at 10:10:27AM -0400, Qian Cai wrote: > > > [ 81.942909] generic_file_read_iter+0x23b/0x4b0 > > [ 81.942918] fuse_file_read_iter+0x280/0x4e0 [fuse] > > [ 81.942931] ? fuse_direct_IO+0xd30/0xd30 [fuse] > > [ 81.94294

Re: slab-out-of-bounds in iov_iter_revert()

2020-09-17 Thread Al Viro
On Thu, Sep 17, 2020 at 01:42:44PM -0400, Qian Cai wrote: > > > > How much IO does it take to trigger that on your reproducer? > > That is something I don't know for sure because it is always reproducible by > running the trinity fuzzer for a few seconds (32 threads). I did another run > belo

Re: slab-out-of-bounds in iov_iter_revert()

2020-09-17 Thread Qian Cai
On Thu, 2020-09-17 at 17:44 +0100, Al Viro wrote: > On Thu, Sep 17, 2020 at 10:10:27AM -0400, Qian Cai wrote: > > > [ 81.942909] generic_file_read_iter+0x23b/0x4b0 > > [ 81.942918] fuse_file_read_iter+0x280/0x4e0 [fuse] > > [ 81.942931] ? fuse_direct_IO+0xd30/0xd30 [fuse] > > [ 81.94294

Re: slab-out-of-bounds in iov_iter_revert()

2020-09-17 Thread Al Viro
On Thu, Sep 17, 2020 at 10:10:27AM -0400, Qian Cai wrote: > [ 81.942909] generic_file_read_iter+0x23b/0x4b0 > [ 81.942918] fuse_file_read_iter+0x280/0x4e0 [fuse] > [ 81.942931] ? fuse_direct_IO+0xd30/0xd30 [fuse] > [ 81.942949] ? _raw_spin_lock_irqsave+0x80/0xe0 > [ 81.942957] ? tim

Re: slab-out-of-bounds in iov_iter_revert()

2020-09-17 Thread Qian Cai
use] [ 81.942931] ? fuse_direct_IO+0xd30/0xd30 [fuse] [ 81.942949] ? _raw_spin_lock_irqsave+0x80/0xe0 [ 81.942957] ? timerqueue_add+0x15e/0x280 [ 81.942960] ? _raw_spin_lock_irqsave+0x80/0xe0 [ 81.942966] new_sync_read+0x3b7/0x620 [ 81.942968] ? __ia32_sys_llseek

Re: slab-out-of-bounds in iov_iter_revert()

2020-09-16 Thread Al Viro
On Thu, Sep 17, 2020 at 03:04:40AM +0100, Al Viro wrote: > On Wed, Sep 16, 2020 at 05:09:49PM -0400, Qian Cai wrote: > > On Sat, 2020-09-12 at 00:55 +0100, Al Viro wrote: > > > On Fri, Sep 11, 2020 at 05:59:04PM -0400, Qian Cai wrote: > > > > Super easy to reproduce on today's mainline by just fuzz

Re: slab-out-of-bounds in iov_iter_revert()

2020-09-16 Thread Al Viro
On Wed, Sep 16, 2020 at 05:09:49PM -0400, Qian Cai wrote: > On Sat, 2020-09-12 at 00:55 +0100, Al Viro wrote: > > On Fri, Sep 11, 2020 at 05:59:04PM -0400, Qian Cai wrote: > > > Super easy to reproduce on today's mainline by just fuzzing for a few > > > minutes > > > on virtiofs (if it ever matters

Re: slab-out-of-bounds in iov_iter_revert()

2020-09-16 Thread Qian Cai
On Sat, 2020-09-12 at 00:55 +0100, Al Viro wrote: > On Fri, Sep 11, 2020 at 05:59:04PM -0400, Qian Cai wrote: > > Super easy to reproduce on today's mainline by just fuzzing for a few > > minutes > > on virtiofs (if it ever matters). Any thoughts? > > Usually happens when ->direct_IO() fucks up an

Re: slab-out-of-bounds in iov_iter_revert()

2020-09-11 Thread Al Viro
On Fri, Sep 11, 2020 at 05:59:04PM -0400, Qian Cai wrote: > Super easy to reproduce on today's mainline by just fuzzing for a few minutes > on virtiofs (if it ever matters). Any thoughts? Usually happens when ->direct_IO() fucks up and reports the wrong amount of data written/read. We had several

slab-out-of-bounds in iov_iter_revert()

2020-09-11 Thread Qian Cai
Super easy to reproduce on today's mainline by just fuzzing for a few minutes on virtiofs (if it ever matters). Any thoughts? [ 511.089112] BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0xd8/0x3c0 iov_iter_revert at lib/iov_iter.c:1135 (inlined by) iov_iter_revert at lib/iov_iter.c