Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Myeonghun Pak <mhun512@gmail.com>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org, security@kernel.org,
	 stable@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: Cancel IOAPIC EOI work before freeing vCPUs
Date: Tue, 28 Jul 2026 05:56:37 -0700	[thread overview]
Message-ID: <aminBc88wFWw4NSC@google.com> (raw)
In-Reply-To: <CAGEsz8FbPu_DtOkTij0RvBriK1R0FspzEU6Oef0Gers-gS1d3w@mail.gmail.com>

On Tue, Jul 28, 2026, Myeonghun Pak wrote:
> The IOAPIC delayed EOI injection worker dereferences local APIC pointers
> from the VM's APIC map.  Since commit 17bcd7144263 ("KVM: x86: Free
> vCPUs before freeing VM state"), kvm_arch_destroy_vm() frees vCPUs and
> their local APICs before kvm_ioapic_destroy() synchronously cancels the
> worker.
> 
> Consequently, if the delayed work is pending when VM teardown starts,
> the worker can run after a local APIC has been freed.

...

> Fixes: 17bcd7144263 ("KVM: x86: Free vCPUs before freeing VM state")
> Cc: stable@vger.kernel.org
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> ---
>  arch/x86/kvm/ioapic.c | 12 +++++++++++-
>  arch/x86/kvm/ioapic.h |  1 +
>  arch/x86/kvm/x86.c    |  1 +
>  3 files changed, 13 insertions(+), 1 deletion(-)
> 
> AI disclosure: I used AI assistance during the audit and am treating the
> issue as public as required by Documentation/process/security-bugs.rst.
> The reproducer has not been posted publicly.

Though that doesn't seem to matter much given you're the fourth person/group to
independently report this bug. :-)

A fix is already pending:
https://lore.kernel.org/all/20260727171718.543491-1-seanjc@google.com

Thanks!

  reply	other threads:[~2026-07-28 12:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  9:33 [PATCH] KVM: x86: Cancel IOAPIC EOI work before freeing vCPUs Myeonghun Pak
2026-07-28 12:56 ` Sean Christopherson [this message]
2026-07-28 16:24   ` Myeonghun Pak

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=aminBc88wFWw4NSC@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=mhun512@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=security@kernel.org \
    --cc=stable@vger.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