Re: [PATCH v9] nbd: fix uaf in nbd_handle_reply()

From: Jens Axboe
Date: Sun Oct 17 2021 - 09:09:24 EST


On Thu, 16 Sep 2021 22:18:10 +0800, Yu Kuai wrote:
> There is a problem that nbd_handle_reply() might access freed request:
>
> 1) At first, a normal io is submitted and completed with scheduler:
>
> internel_tag = blk_mq_get_tag -> get tag from sched_tags
> blk_mq_rq_ctx_init
> sched_tags->rq[internel_tag] = sched_tag->static_rq[internel_tag]
> ...
> blk_mq_get_driver_tag
> __blk_mq_get_driver_tag -> get tag from tags
> tags->rq[tag] = sched_tag->static_rq[internel_tag]
>
> [...]

Applied, thanks!

[1/1] nbd: fix uaf in nbd_handle_reply()
commit: 52c90e0184f67eecb00b53b79bfdf75e0274f8fd

Best regards,
--
Jens Axboe