[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aEh9DxZ0AQSSranB@kbusch-mbp>
Date: Tue, 10 Jun 2025 12:44:31 -0600
From: Keith Busch <kbusch@...nel.org>
To: Penglei Jiang <superman.xpt@...il.com>
Cc: axboe@...nel.dk, io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
syzbot+531502bbbe51d2f769f4@...kaller.appspotmail.com
Subject: Re: [PATCH v2] io_uring: fix use-after-free of sq->thread in
__io_uring_show_fdinfo()
On Tue, Jun 10, 2025 at 10:18:01AM -0700, Penglei Jiang wrote:
> @@ -379,7 +380,8 @@ static int io_sq_thread(void *data)
> io_sq_tw(&retry_list, UINT_MAX);
>
> io_uring_cancel_generic(true, sqd);
> - sqd->thread = NULL;
> + rcu_assign_pointer(sqd->thread, NULL);
I believe this will fail a sparse check without adding the "__rcu" type
annotation on the struct's "thread" member.
Powered by blists - more mailing lists