Re: [syzbot] [io-uring?] KASAN: slab-use-after-free Read in io_waitid_wait
From: syzbot
Date: Tue Oct 07 2025 - 09:20:11 EST
> #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git
want either no args or 2 args (repo, branch), got 5
>
> diff --git a/io_uring/waitid.c b/io_uring/waitid.c
> index 26c118f3918d..f25110fb1b12 100644
> --- a/io_uring/waitid.c
> +++ b/io_uring/waitid.c
> @@ -230,13 +230,14 @@ static int io_waitid_wait(struct wait_queue_entry *wait, unsigned mode,
> if (!pid_child_should_wake(wo, p))
> return 0;
>
> + list_del_init(&wait->entry);
> +
> /* cancel is in progress */
> if (atomic_fetch_inc(&iw->refs) & IO_WAITID_REF_MASK)
> return 1;
>
> req->io_task_work.func = io_waitid_cb;
> io_req_task_work_add(req);
> - list_del_init(&wait->entry);
> return 1;
> }
>
>
> --
> Jens Axboe