From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.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 5CE3D34C820 for ; Fri, 5 Dec 2025 17:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954029; cv=none; b=o12asPAn5T5JV++qSV/DIZWLepoJCR6Q/CHCP6FKZaJ8vhWHz+Uiys8x7AknviBHe3HW3A5sPUngVHYXYvl2HG+RBHeK3/IQRmvNHjSLs5W+N9qf1tLc8K5mZTWkeYRR4jnWjADlpWWvQXrpb2HZCYGusdIcp0goMCJxUQ7ZvTI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764954029; c=relaxed/simple; bh=DHNk5w9XwMwbV9CixJzEXeub5jf6A4O9Fnq+bSSpvBc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ih+IsliyE6MmAATI3MzHfFTpWgY9uAYbiOT8rHn717OiDmR0XUCyAn3A0mvH9w+wGbE7AzYhWHESAGfHTdOW+/Lu+eTEMNrklTpm+L5tl3qB99cNTltLo+ZqBe2nlS9W5vhyo39QV1MjqPoFCbcUbUpCz5Qx+P5KCJqcxLxt4Kw= 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=GpBvGa8l; arc=none smtp.client-ip=209.85.214.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="GpBvGa8l" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-295595cd102so43502225ad.3 for ; Fri, 05 Dec 2025 09:00:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764954013; x=1765558813; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=n2gYfoz6OBxfy2iG9IvxpX8oLw5cF4SiJlpoRIbvvvo=; b=GpBvGa8l4ByrboR6idAncBNLiyvzMX+qPDbskI7ghdMUmX16GWz6jvrwCruNokTt0I DcNVVbvP+jEiLEkhUm5WGB2Dd1AWI8Zgl1eJ6L/j5aiOj52xH3XgzxtEMIfMWblEmf1K 2FCPH1x9RgRSa/hipVTMFbTZfi9jyriFZukB+Pnr3vViTxnIT/f4OJMva/q/6HRSKa9V GnEbSp6Y9tPKLhJHNx4mr34VgW3E5mVFBIGDTAW0DKFoUOOqVwS+YdPmeHwQBt9KO0nP g6ouAHXidFFEoCtbHglfWbmMJGTspKkynN07rOHai254FzEJ/eOKZ8YJJfkem4HTm9pP YqHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764954013; x=1765558813; h=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; bh=n2gYfoz6OBxfy2iG9IvxpX8oLw5cF4SiJlpoRIbvvvo=; b=Quzadho/okdHxLxueMukQJNjKWnh/Q8YfyXSxYrnuXFdZtWcAfvKJoBtaxf5zdbbz/ AtqGg8dKnO5Wx9dEwgo/hI2WWpOB54qfq4ngZy7v8+MqbxAGzjOG6wNw67zLmg0Ck4Mk x9KTaOIphwdNgPDPm9G17L7puo4AJwTqUp7fwsAT0ZY5VGeI9t5mr7M7rTXwcOjk1lsX CEAWg9QH5REf5vznl2/TMpCYezFZBLyLfbaP5JBTH/ceiRlIaw220LpXbYUNsfMXmUva 5A9Vir/jWtnvItXpiE4reQXYCJutAic1sxB70f9mHipOlquX+dYE1TAYge/k8tEFotRs XipA== X-Forwarded-Encrypted: i=1; AJvYcCVdXsxZRJN4i0jtEi9HPxmQKjHseDo+FVzcsAQb9dGS1uiX6Qiaj0XbdlMVe7V/hUphjuDbH+bN6CrxHrk=@vger.kernel.org X-Gm-Message-State: AOJu0YxYSDWCfFTGBKVDwSek+xLplovmlOk8Q7TU5PtVbjdRb6PdkuCI +5v+EozthXA97B1Hzw0yn8ZJXtljfu6k9ZlA2TOFdFrB9fWn0zSfxdG47hTsupzwynim9Lmab9/ 6gVhAQQ== X-Google-Smtp-Source: AGHT+IHTewcuK4468H9YP/872oeRWG0b+MNWtRerydq5/7oXw7h4HToXu6iciqteusC+zbCGaDlYOaNUKM8= X-Received: from pgc2.prod.google.com ([2002:a05:6a02:2f82:b0:bc0:a646:a342]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6300:8b0f:b0:366:14ac:e1f4 with SMTP id adf61e73a8af0-36614ace6dcmr824505637.70.1764954012983; Fri, 05 Dec 2025 09:00:12 -0800 (PST) Date: Fri, 5 Dec 2025 08:59:27 -0800 In-Reply-To: <20251202020334.1171351-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: <20251202020334.1171351-1-seanjc@google.com> X-Mailer: git-send-email 2.52.0.223.gf5cc29aaa4-goog Message-ID: <176494720872.296359.3976381514002984346.b4-ty@google.com> Subject: Re: [PATCH 0/2] KVM: Fix a guest_memfd memslot UAF From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Alexander Potapenko Content-Type: text/plain; charset="utf-8" On Mon, 01 Dec 2025 18:03:32 -0800, Sean Christopherson wrote: > Fix a UAF due to leaving a dangling guest_memfd memslot binding by > disallowing clearing KVM_MEM_GUEST_MEMFD on a memslot. The intent was > that guest_memfd memslots would be immutable (could only be deleted), > but somewhat ironically we missed the case where KVM_MEM_GUEST_MEMFD > itself is the only flag that's toggled. > > This is an ABI change, but I can't imagine anyone was relying on > disappearing a guest_memfd memslot. > > [...] Applied to kvm-x86 fixes (I'm feeling lucky with the ABI change). [1/2] KVM: Disallow toggling KVM_MEM_GUEST_MEMFD on an existing memslot https://github.com/kvm-x86/linux/commit/9935df5333aa [2/2] KVM: Harden and prepare for modifying existing guest_memfd memslots https://github.com/kvm-x86/linux/commit/af62fe2494da -- https://github.com/kvm-x86/linux/tree/next