public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: syzbot <syzbot+b9e83021d9c642a33d8c@syzkaller.appspotmail.com>,
	io-uring@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [io-uring?] KASAN: slab-use-after-free Read in io_waitid_wait
Date: Tue, 7 Oct 2025 07:24:32 -0600	[thread overview]
Message-ID: <747c4bf7-49bb-478d-a8f1-c7092ceaaa81@kernel.dk> (raw)
In-Reply-To: <68e50af2.a00a0220.298cc0.0479.GAE@google.com>

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git master

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

  parent reply	other threads:[~2025-10-07 13:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-07 12:43 [syzbot] [io-uring?] KASAN: slab-use-after-free Read in io_waitid_wait syzbot
2025-10-07 13:20 ` Jens Axboe
2025-10-07 13:20   ` syzbot
2025-10-07 13:24 ` Jens Axboe [this message]
2025-10-07 13:45   ` syzbot
2025-10-09 16:56 ` Jens Axboe
2025-10-09 17:11   ` syzbot
2025-10-09 17:16     ` Jens Axboe
2025-10-09 17:36       ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=747c4bf7-49bb-478d-a8f1-c7092ceaaa81@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzbot+b9e83021d9c642a33d8c@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox