From: Jens Axboe <axboe@kernel.dk>
To: Nyakundi Emmanuel <nyariboemmanuel8@gmail.com>
Cc: federico.brasili@gmail.com, io-uring@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] test/recv-bundle-pbuf-len-poison: add regression test for pbuf len corruption
Date: Sun, 7 Jun 2026 16:16:30 -0600 [thread overview]
Message-ID: <b5dd8fa7-4b6e-4c08-8468-236b6b2c59c2@kernel.dk> (raw)
In-Reply-To: <20260607221114.135950-1-nyariboemmanuel8@gmail.com>
On 6/7/26 4:10 PM, Nyakundi Emmanuel wrote:
> A failed IORING_RECVSEND_BUNDLE receive on a non-INC provided-buffer
> ring can persistently corrupt the buffer descriptor length. When the
> receive fails with -EAGAIN, the kernel writes the requested length into
> buf->len during buffer selection but never restores it on failure.
>
> A later unrelated IORING_OP_READ using the same buffer group then
> consumes the corrupted length, returning fewer bytes than expected.
>
> This test reproduces the issue as reported by Federico Brasili.
Thanks, but I already wrote one, which also tests the much more
important aspect of the kernel change - that the reported CQE
completion reports the right amount without truncating the
buffer length when no bytes have been transferred.
And once again, it's not _corrupting_ the buffer length. It's
shrinking it, which is unexpected and should not happen, but there's
no corruption taking place.
I'm dubious on how much AI koolaid was used in reproducing the
test case and report? That said, it is something we should fix,
as the kernel should not be changing the buffer length for this
case.
--
Jens Axboe
next prev parent reply other threads:[~2026-06-07 22:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-07 11:41 [BUG io_uring] Failed RECVSEND_BUNDLE can persistently shrink non-INC pbuf ring len and affect later READ operations Federico Brasili
2026-06-07 19:07 ` Jens Axboe
2026-06-07 20:08 ` Federico Brasili
2026-06-07 21:22 ` Nyakundi Emmanuel
2026-06-07 21:39 ` Jens Axboe
2026-06-07 22:10 ` [PATCH] test/recv-bundle-pbuf-len-poison: add regression test for pbuf len corruption Nyakundi Emmanuel
2026-06-07 22:16 ` Jens Axboe [this message]
2026-06-07 21:38 ` [BUG io_uring] Failed RECVSEND_BUNDLE can persistently shrink non-INC pbuf ring len and affect later READ operations Jens Axboe
2026-06-07 21:52 ` Jens Axboe
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=b5dd8fa7-4b6e-4c08-8468-236b6b2c59c2@kernel.dk \
--to=axboe@kernel.dk \
--cc=federico.brasili@gmail.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nyariboemmanuel8@gmail.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
Powered by JetHome