All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: redacherkaoui <redacherkaoui67@gmail.com>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	 redahack12-glitch <redahack12@gmail.com>
Subject: Re: [PATCH] KVM: coalesced_mmio: Fix out-of-bounds write in coalesced_mmio_write()
Date: Mon, 1 Dec 2025 11:03:17 -0800	[thread overview]
Message-ID: <aS3mdTKmTFIpc3ye@google.com> (raw)
In-Reply-To: <20251127001132.13704-1-redacherkaoui67@gmail.com>

On Thu, Nov 27, 2025, redacherkaoui wrote:
> From: redahack12-glitch <redahack12@gmail.com>
> 
> The coalesced MMIO ring stores each entry's MMIO payload in an 8-byte
> fixed-size buffer (data[8]). However, coalesced_mmio_write() copies
> the payload using memcpy(..., len) without verifying that 'len' does not
> exceed the buffer size.
> 
> A malicious

KVM controls all callers.

> or buggy caller could therefore trigger a write past the end of the data[]
> array and corrupt adjacent kernel memory inside the ring page.

True, but if a caller is buggy, KVM likely has bigger problems because KVM relies
on MMIO (and PIO) accesses being no larger than 8 in a number of locations.  If
we want to harden KVM, kvm_iodevice_{read,write}() would be a better place for a
sanity check.

      reply	other threads:[~2025-12-01 19:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  0:11 [PATCH] KVM: coalesced_mmio: Fix out-of-bounds write in coalesced_mmio_write() redacherkaoui
2025-12-01 19:03 ` Sean Christopherson [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=aS3mdTKmTFIpc3ye@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=redacherkaoui67@gmail.com \
    --cc=redahack12@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 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.