From: Jens Axboe <axboe@kernel.dk>
To: Ming Lei <ming.lei@redhat.com>, Liu Xiaodong <xiaodong.liu@intel.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Jim Harris <james.r.harris@intel.com>,
Ben Walker <benjamin.walker@intel.com>
Subject: Re: [PATCH] block: ublk: extending queue_size to fix overflow
Date: Tue, 31 Jan 2023 07:59:06 -0700 [thread overview]
Message-ID: <167517714685.21899.10299241689859963675.b4-ty@kernel.dk> (raw)
In-Reply-To: <20230131070552.115067-1-xiaodong.liu@intel.com>
On Tue, 31 Jan 2023 02:05:52 -0500, Liu Xiaodong wrote:
> When validating drafted SPDK ublk target, in a case that
> assigning large queue depth to multiqueue ublk device,
> ublk target would run into a weird incorrect state. During
> rounds of review and debug, An overflow bug was found
> in ublk driver.
>
> In ublk_cmd.h, UBLK_MAX_QUEUE_DEPTH is 4096 which means
> each ublk queue depth can be set as large as 4096. But
> when setting qd for a ublk device,
> sizeof(struct ublk_queue) + depth * sizeof(struct ublk_io)
> will be larger than 65535 if qd is larger than 2728.
> Then queue_size is overflowed, and ublk_get_queue()
> references a wrong pointer position. The wrong content of
> ublk_queue elements will lead to out-of-bounds memory
> access.
>
> [...]
Applied, thanks!
[1/1] block: ublk: extending queue_size to fix overflow
commit: 29baef789c838bd5c02f50c88adbbc6b955aaf61
Best regards,
--
Jens Axboe
prev parent reply other threads:[~2023-01-31 15:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 7:05 Liu Xiaodong
2023-01-31 10:15 ` Ming Lei
2023-01-31 14:59 ` Jens Axboe [this message]
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=167517714685.21899.10299241689859963675.b4-ty@kernel.dk \
--to=axboe@kernel.dk \
--cc=benjamin.walker@intel.com \
--cc=james.r.harris@intel.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=xiaodong.liu@intel.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
all inboxes | Powered by JetHome®