From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51A9741E6D7 for ; Tue, 14 Jul 2026 19:31:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784057517; cv=none; b=DrvV0mnc3Bs5YfpdIYwDN8t9Iiy+SeQsT4og8qPwulAFyC/eNZVatG0CR5unHdN6QIFFSX9XdHxZzlYbfrtYy5BXcCeB4tY9F5yiEFprGQXC6aaQC2PZcgXQemdWlEzg/G6x3tSZzZEScNcQzL9FeGE2j3t6l8bBa2canGRpq1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784057517; c=relaxed/simple; bh=F2LcxpyeXbAZ6yQuz9HOO9xrrEoR3dr2RspAi9wdfm4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=bfFjJkB+T5d1TF73O8DFiyoKs+qJ8h8Rl3ksgHsBrMre84nq57LNXD1dUc8f3CI7Ci+1MT9knw1jqyb79DU5cSg77SeakrFPxsymZbfsIQVKkwh4+5uVRdDfI5u90VesMAEkb0nig+B8TTXbp8awjeaT00XH07U8xp57ihEeTCE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=HQQghNLm; arc=none smtp.client-ip=209.85.210.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="HQQghNLm" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-84857446424so9359413b3a.1 for ; Tue, 14 Jul 2026 12:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784057516; x=1784662316; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=WqLINI4cFEscy/WZPHG4l7ke5CIh8W6rLK+pWJB8PLY=; b=HQQghNLmPJbqKTTUjZRV9F5lqFbgwepH3HyWhW1iqCym5+pFIiCDV0t9sq4piJRcov /NQ2Ef6MRZR+afhlk9xSOoMQfb/p+0wCWmhQLThoDf8VWJNTQclct87Of3wO55xFO4A7 5C4+XKAE0sjSigETK/d+hRAeEVfu8lOPzpt0JmKgSDzONEmrXgRGRYX5iaJd1lErWCVq KtiUKTCQxHUIlpPy+OYZXJtyV/butn6sy4xE9SnFc8Y2gBZOiUU1sNxEoczGsSj5cRKH b8e1lQusKxPBB8Luq1LLOJA6EHy6NTN5eT8724MPoA8aX3Y8nmf3gSyg0vvH2k3UhPLq PrLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784057516; x=1784662316; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=WqLINI4cFEscy/WZPHG4l7ke5CIh8W6rLK+pWJB8PLY=; b=UXLD89zwjdlLEHOo4hx+Y5Kax188E6YAVIreOIuyR/t/Zh1bB+JtQVnKY7+/WK3UZc n2oFUaJm7zVeSQ3W2KoHgPMuk+pTtv6TZwmiXm2EOvDXZbnkHvwXs1TQE86W8xMEwYWp 1xGqrKrSGZWQiX3fzMAbtuv+4Tha4x2d6AMDg26Biexh6f6UHHPjuoIpmddK+yqy05/K iNAeoRnAS6esDCAHKZ1+ZI4hrgPM5x6VkthdhPxCcuBINO56w5ItP0BwX/bxXZ3DCyAH aWS5rKszQxuU30sb64vlOC4FeoRNYciP4x2zjmn+9/qb6q5c+4/jsRCSZPgOGr9BsJo1 ZyiQ== X-Forwarded-Encrypted: i=1; AHgh+Rp6dxDIy6psJUTErUjEp2RsH2Kd2JlqPsirv5l4i4E+YM6ycYE7GlvBh0xL4xco3weoUaEzRQWvWtP6ecI=@vger.kernel.org X-Gm-Message-State: AOJu0YyDYl5zOJUfy/n6Z/mH4rrW1bubqN8gdvySltlMBBvGYTE35KmI W9Q5B/SC6Tvz/tDbwfRCRJ9KH5okK2xBGBmPCYbtoZrlF4A67oPyrufFk8qbQ78frelCRmU0uyt DDLnBqA== X-Received: from pfbdf3.prod.google.com ([2002:a05:6a00:4703:b0:848:4733:fed1]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:b4f:b0:847:b16b:46d9 with SMTP id d2e1a72fcca58-84889638249mr13298024b3a.34.1784057515437; Tue, 14 Jul 2026 12:31:55 -0700 (PDT) Date: Tue, 14 Jul 2026 11:41:41 -0700 In-Reply-To: <20260630210156.457151-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260630210156.457151-1-seanjc@google.com> X-Mailer: git-send-email 2.55.0.141.g00534a21ce-goog Message-ID: <178405424478.3139621.10082262087500923351.b4-ty@google.com> Subject: Re: [PATCH v2 0/3] KVM: SVM: Fix a (very) unlikely UAF for GA Log IRQs From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Naveen N Rao , Xiao Wu Content-Type: text/plain; charset="utf-8" On Tue, 30 Jun 2026 14:01:53 -0700, Sean Christopherson wrote: > Fix a potential UAF due to freeing vCPUs while they're still reachable through > the global hashed list used to handle GA Log notifications. > > v2: > - Defer adding the VM to the GA Log list until a vCPU is created (KVM only > needs GA Lot notifications to wake blocking vCPUs), so that removing the > VM from the list can be done during pre-destroy without having to handle > the scenario where VM creation fails at a later stage. [Sashiko, Xiao] > - Drop the stable@ tag, as it's not clear to me that the bug can actually > occur in the wild, whereas the changes themselves are somewhat risky. > > [...] Applied to kvm-x86 svm, and I even remembered to drop the avic_vm_init() declaration. [1/3] KVM: SVM: Make kvm_x86_ops.vcpu_precreate() hook fully AVIC specific https://github.com/kvm-x86/linux/commit/8b47740b3ae0 [2/3] KVM: SVM: Do all per-VM AVIC initialization during vCPU precreation phase https://github.com/kvm-x86/linux/commit/4fa9a3767d1a [3/3] KVM: SVM: Remove VM from the GA Log notifier list before VM destruction https://github.com/kvm-x86/linux/commit/78684b65fcc0 -- https://github.com/kvm-x86/linux/tree/next