From: Jens Axboe <axboe@kernel.dk>
To: Hao-Yu Yang <naup96721@gmail.com>
Cc: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org
Subject: Re: [PATCH v1] io_uring: fix dangling iovec after provided-buffer bundle grow failure
Date: Mon, 6 Jul 2026 11:13:55 -0600 [thread overview]
Message-ID: <dbf0ae11-ce9a-4c98-bfcc-ff3f8f12b26f@kernel.dk> (raw)
In-Reply-To: <akvfYLvrpF5104us@naup-virtual-machine>
On 7/6/26 11:01 AM, Hao-Yu Yang wrote:
> Sorry, i forgot to cc others mail
>
> I discovered and wrote the PoC myself. Trigger way is
> send1: Submit an IORING_OP_SEND request with four valid
> provided buffers. The system will allocate and cache an
> iovec array (of size 4) for this request and store the
> pointer in kmsg->vec.iovec.
>
> send2: Submit a second send request with 8, and I set
> the fourth passed-in address to point to an invalid address.
> Now kmsg still hold old iovec, but old iovec object have
> been freed.
>
> So this will lead dangling pointer.
Side note: please don't top post, linux mailing lists always reply
under the text for better readability. Top posting turns any kind
of threaded conversation into both a mess, and it's also wasteful.
Great thanks! Want to turn this into a liburing test case? Then we can
include it there as well, and it'd catch both UAF and memory leaks when
run.
--
Jens Axboe
next prev parent reply other threads:[~2026-07-06 17:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 23:45 [PATCH v1] io_uring: fix dangling iovec after provided-buffer bundle grow failure Hao-Yu Yang
2026-07-06 16:19 ` Jens Axboe
2026-07-06 16:56 ` Hao-Yu Yang
2026-07-06 16:20 ` Jens Axboe
2026-07-06 17:01 ` Hao-Yu Yang
2026-07-06 17:13 ` Jens Axboe [this message]
2026-07-06 17:34 ` Hao-Yu Yang
2026-07-06 17:39 ` Jens Axboe
2026-07-06 17:46 ` Hao-Yu Yang
2026-07-06 18:06 ` 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=dbf0ae11-ce9a-4c98-bfcc-ff3f8f12b26f@kernel.dk \
--to=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=naup96721@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