Re: [io_uring] KASAN: use-after-free Read in signalfd_cleanup

From: Eric Biggers
Date: Thu Jan 12 2023 - 21:26:24 EST


On Thu, Jan 12, 2023 at 07:17:25PM -0700, Jens Axboe wrote:
> On 1/12/23 7:12 PM, Eric Biggers wrote:
> > Over to the io_uring maintainers and list, based on the reproducer...:
> >
> > r0 = signalfd4(0xffffffffffffffff, &(0x7f00000000c0), 0x8, 0x0)
> > r1 = syz_io_uring_setup(0x87, &(0x7f0000000180), &(0x7f0000ffc000/0x3000)=nil, &(0x7f00006d4000/0x1000)=nil, &(0x7f0000000000)=<r2=>0x0, &(0x7f0000000040)=<r3=>0x0)
> > pipe(&(0x7f0000000080)={0xffffffffffffffff, <r4=>0xffffffffffffffff})
> > write$binfmt_misc(r4, &(0x7f0000000000)=ANY=[], 0xfffffecc)
> > syz_io_uring_submit(r2, r3, &(0x7f0000002240)=@IORING_OP_POLL_ADD={0x6, 0x0, 0x0, @fd=r0}, 0x0)
> > io_uring_enter(r1, 0x450c, 0x0, 0x0, 0x0, 0x0)
>
> This was a buggy patch in a branch, already updated and can be discarded.
>

Then let's do:

#syz invalid