mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Kelley <mhklinux@outlook.com>
To: Kameron Carr <kameroncarr@linux.microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	Michael Kelley <mhklinux@outlook.com>
Cc: "linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 5/5] Documentation: hyperv: Describe validation of the ring buffer indices
Date: Tue, 20 Oct 2026 18:04:28 +0000	[thread overview]
Message-ID: <MN2PR02MB686317D05DF1C791A8A9558FD4672@MN2PR02MB6863.namprd02.prod.outlook.com> (raw)
In-Reply-To: <20261019230950.1573677-6-kameroncarr@linux.microsoft.com>

From: Kameron Carr <kameroncarr@linux.microsoft.com> Sent: Monday, October 19, 2026 4:10 PM
> 
> Document that the guest must snapshot and validate the read and write
> indices before using them to index into the ring buffer or to compute
> the available space.
> 
> Signed-off-by: Kameron Carr <kameroncarr@linux.microsoft.com>

Reviewed-by: Michael Kelley <mhklinux@outlook.com>

> ---
>  Documentation/virt/hyperv/coco.rst | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/virt/hyperv/coco.rst b/Documentation/virt/hyperv/coco.rst
> index 3231e51..3e20249 100644
> --- a/Documentation/virt/hyperv/coco.rst
> +++ b/Documentation/virt/hyperv/coco.rst
> @@ -200,7 +200,10 @@ validation is performed. For messages passed from the host
> to the guest in a
>  VMBus ring buffer, the length of the message is validated, and the message is
>  copied into a temporary (encrypted) buffer for further validation and
>  processing. The copying adds a small amount of overhead, but is the only way
> -to protect against a malicious host. See hv_pkt_iter_first().
> +to protect against a malicious host. See hv_pkt_iter_first(). Similarly, the
> +ring buffer header is shared with the host, so the guest must snapshot and
> +validate the read and write indices before using them to index into the ring
> +buffer or to compute available space.
> 
>  Many drivers for VMBus devices have been "hardened" by adding code to fully
>  validate messages received over VMBus, instead of assuming that Hyper-V is
> 
> --
> 2.45.4


  reply	other threads:[~2026-10-20 18:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 23:09 [PATCH v2 0/5] Drivers: hv: vmbus: Harden the ring buffer against a malicious host Kameron Carr
2026-10-19 23:09 ` [PATCH v2 1/5] Drivers: hv: vmbus: Bounds check the shared ring buffer indices Kameron Carr
2026-10-19 23:09 ` [PATCH v2 2/5] Drivers: hv: vmbus: Use *_ONCE() to access " Kameron Carr
2026-10-19 23:09 ` [PATCH v2 3/5] Drivers: hv: vmbus: Compute ring byte counts from a caller-held snapshot Kameron Carr
2026-10-20 18:04   ` Michael Kelley
2026-10-19 23:09 ` [PATCH v2 4/5] Drivers: hv: vmbus: Keep the ring byte counts sane for a bad index Kameron Carr
2026-10-20 18:04   ` Michael Kelley
2026-10-19 23:09 ` [PATCH v2 5/5] Documentation: hyperv: Describe validation of the ring buffer indices Kameron Carr
2026-10-20 18:04   ` Michael Kelley [this message]
2026-10-23 18:23 ` [PATCH v2 0/5] Drivers: hv: vmbus: Harden the ring buffer against a malicious host Mitchell Levy

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=MN2PR02MB686317D05DF1C791A8A9558FD4672@MN2PR02MB6863.namprd02.prod.outlook.com \
    --to=mhklinux@outlook.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kameroncarr@linux.microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wei.liu@kernel.org \
    /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®