[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d53a726a-6e77-45ed-a170-6e1463927440@kernel.dk>
Date: Mon, 27 Oct 2025 19:09:08 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Keith Busch <kbusch@...nel.org>
Cc: syzbot <syzbot+10a9b495f54a17b607a6@...kaller.appspotmail.com>,
io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [io-uring?] INFO: task hung in io_uring_del_tctx_node
(5)
On 10/27/25 6:03 PM, Keith Busch wrote:
> On Mon, Oct 27, 2025 at 05:15:56PM -0600, Jens Axboe wrote:
>>>> leaves fdinfo open up to being broken. Before, we had:
>>>>
>>>> sq_entries = min(sq_tail - sq_head, ctx->sq_entries);
>>>>
>>>> as a cap for the loop, now you just have:
>>>>
>>>> while (sq_head < sq_tail) {
>>>>
>>>> which seems like a bad idea. It's also missing an sq_head increment if
>>>> we hit this condition:
>>>
>>> This would have to mean the application did an invalid head ring-wrap,
>>> right?
>>
>> Right, it's a malicious use case. But you always have to be able to deal
>> with those, it's not like broken hardware in that sense.
>>
>>> Regardless, I messed up and the wrong thing will happen here in
>>> that case as well as the one you mentioned.
>>
>> Yep I think so too, was more interested in your opinion on the patch :-)
>
> Yeah, patch looks good.
Thanks for checking! I'll send it out.
> I plowed through this thinking the mixed CQE
> showed the way, but didn't appreciate the subtle differences on the
> submission side.
Ah right, yes on the CQ side the kernel controls it as the producer. No
such risk there.
--
Jens Axboe
Powered by blists - more mailing lists