From: Sean Christopherson <seanjc@google.com>
To: Naveen N Rao <naveen@kernel.org>
Cc: Dmytro Maluka <dmaluka@chromium.org>,
sashiko-reviews@lists.linux.dev, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: VMX: Postpone IPIv setup after successful vCPU creation
Date: Mon, 20 Jul 2026 14:38:31 -0700 [thread overview]
Message-ID: <al6VVx1rKn46ZCUl@google.com> (raw)
In-Reply-To: <al4rNqpBYy8FGKPw@blrnaveerao1>
On Mon, Jul 20, 2026, Naveen N Rao wrote:
> On Thu, Jul 16, 2026 at 07:24:10PM +0200, Dmytro Maluka wrote:
> > On Thu, Jul 16, 2026 at 04:29:00PM +0000, sashiko-bot@kernel.org wrote:
> > > [Severity: Critical]
> > > This isn't a bug introduced by this patch, but does this exact same
> > > vulnerability exist in the AMD SVM AVIC code?
> > >
> > > It looks like the SVM code suffers from the same use-after-free pattern
> > > when userspace creates a duplicate vCPU ID.
> >
> > Seems plausible. Can someone with AMD expertise look into this?
> >
> > > In arch/x86/kvm/svm/avic.c:avic_init_backing_page(), the newly allocated
> > > APIC backing page address is written into the VM-wide hardware IPI table
> > > before the vCPU ID duplicate check:
> > >
> > > WRITE_ONCE(kvm_svm->avic_physical_id_table[id], new_entry);
>
> Yes, this write (or just setting AVIC_PHYSICAL_ID_ENTRY_VALID_MASK) will
> need to be delayed to a post-create phase similar to VMX.
>
> The alternative is to simply skip setting the entry valid during vCPU
> creation and to instead do it unconditionally during vcpu_load(), where
> we anyway have to update the entry.
Won't work, vcpu_load() is called during vCPU creation. :-(
next prev parent reply other threads:[~2026-07-20 21:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 16:08 [PATCH] KVM: VMX: Postpone IPIv setup after successful vCPU creation Dmytro Maluka
2026-07-16 16:29 ` sashiko-bot
2026-07-16 17:24 ` Dmytro Maluka
2026-07-20 14:18 ` Naveen N Rao
2026-07-20 21:38 ` Sean Christopherson [this message]
2026-07-17 12:59 ` Huang, Kai
2026-07-17 16:20 ` Dmytro Maluka
2026-07-17 21:21 ` Huang, Kai
2026-07-20 22:17 ` Sean Christopherson
2026-07-20 23:10 ` Huang, Kai
2026-07-20 23:15 ` Sean Christopherson
2026-07-20 23:22 ` Huang, Kai
2026-07-21 9:26 ` Dmytro Maluka
2026-07-20 6:29 ` Chao Gao
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=al6VVx1rKn46ZCUl@google.com \
--to=seanjc@google.com \
--cc=dmaluka@chromium.org \
--cc=kvm@vger.kernel.org \
--cc=naveen@kernel.org \
--cc=sashiko-reviews@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox