From: sashiko-bot@kernel.org
To: "Annie Kim" <pulpannie@gmail.com>
Cc: virtualization@lists.linux.dev,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH v2] virtio_blk: validate zone append sector from device
Date: Mon, 23 Nov 2026 08:54:02 +0000 [thread overview]
Message-ID: <sashiko-outbox-228917@kernel.org> (raw)
In-Reply-To: <20261123084701.2616027-1-pulpannie@gmail.com>
> From: Hyokyung Kim <pulpannie@gmail.com>
>
> The device reports the starting sector for REQ_OP_ZONE_APPEND completions,
> and virtio_blk copies it into req->__sector without checking that it
> still refers to the requested zone. A buggy or malicious device can
> therefore make upper layers believe the append landed at an arbitrary
> location.
>
> Validate successful zone append completions before updating
> req->__sector. The returned sector must not precede the request start
> and the entire request must fit within the zone writable capacity.
> Reject invalid completions with BLK_STS_IOERR.
>
> The polling path may batch successful completions, and a batch can only
> be completed as successful. Perform the same validation in
> virtblk_poll() before admitting a request to the batch, so that invalid
> zone append completions are not batched and are completed with an error
> instead. Move the request completion into __virtblk_request_done(),
> which takes the status from its caller, so that a polled completion that
> is not batched is not validated a second time.
>
> Fixes: 95bfec41bd3d ("virtio-blk: add support for zoned block devices")
> Signed-off-by: Hyokyung Kim <pulpannie@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123084701.2616027-1-pulpannie@gmail.com?part=1
next prev parent reply other threads:[~2026-11-23 8:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 8:46 [PATCH v2] virtio_blk: validate zone append sector from device Annie Kim
2026-11-23 8:54 ` sashiko-bot [this message]
2026-11-24 4:24 ` Damien Le Moal
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=sashiko-outbox-228917@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=eperezma@redhat.com \
--cc=mst@redhat.com \
--cc=pulpannie@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.