From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FC9018787A; Sat, 17 Oct 2026 16:50:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792255851; cv=none; b=QmQLebc/66SZ9lXB37EplQTSu4esvb/usCDLAwUfjPLcNwjdHmW6boTo0fFmfAz8j8uIGVx1necrS5/qGSkvnrK3x2VXyis617lp+GotNu05WmT8ufaI44cyT3zFnPVuBV6wtdlz6VzsOOQcuuCnVKcqTMCW3f/9KdVSxOs8hHA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792255851; c=relaxed/simple; bh=btiiE6wVFN0aNoaSGWsoWNoAxA/1eUbNuKukTAjJp3M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K09MBXCfc4yeTlqZU0mWjYwS0/bbdiN4FbdNRFx4rXx15UKrD13yBAMLnePLdIiRFZWWStttoZKJm5Pl5L8ogidiSr3iKuamLr2ofLYCo3OXWb2D1cqXoqVOeoeryv7nRRjORuKnwkmlb8BxptkkdkCJEAo4h+dt670p5WEv9wY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eElXfXaR; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eElXfXaR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 614581F000C4; Sat, 17 Oct 2026 16:50:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792255850; bh=tdaWSb88kds9yww3/4NOj5BkyBYWjZPjaHkd/31q0FE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=eElXfXaRNNE3SfW6zcw9zremwSFttdjRC6wY2cLygs+2Vsd9Vs5H3Q73DU/EZkgzp dEk1+wp6+sVbdodWyFiO/AZxDj9lmZo5XKe+ObjSGyoOs2fSS2yaZPBtePPGfiuVkb h6TgmGIVe8pG6Me6iZyr2VVqL8C4WbRYZIucs2gs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christian Borntraeger , Matthew Rosato , Claudio Imbrenda , Sasha Levin Subject: [PATCH 6.6 0025/1674] KVM: s390: Zero initialize data structures for inject_pfault_token Date: Sat, 17 Oct 2026 17:38:17 +0200 Message-ID: <20261017160431.785503080@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261017160431.119607952@linuxfoundation.org> References: <20261017160431.119607952@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christian Borntraeger [ Upstream commit 4e2c7f7cbc27418f9a290399b986c1b85ff93b90 ] __kvm_inject_pfault_token() only sets .type and .u.ext.ext_params2 of the on-stack struct kvm_s390_irq but the full ext substructure is copied into the cpu local variable on inject. ext_params and pad contain stale stack values. Interrupt delivery only uses ext_params2, so nothing leaks to the guest, but a host user can use the migration ioctls to get to the data. Fix by zero-initializing the irq struct. Do the same for the inti data structure. Fixes: 383d0b050106 ("KVM: s390: handle pending local interrupts via bitmap") Cc: stable@vger.kernel.org Signed-off-by: Christian Borntraeger Reviewed-by: Matthew Rosato Reviewed-by: Claudio Imbrenda Signed-off-by: Claudio Imbrenda Message-ID: <20260805110455.7200-3-borntraeger@linux.ibm.com> [ Adjusted context for missing inti_mem and ret declarations in __kvm_inject_pfault_token(). ] Signed-off-by: Sasha Levin --- arch/s390/kvm/kvm-s390.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index cf075a8934226..0e948d598b6a0 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -4597,8 +4597,8 @@ long kvm_arch_fault_in_page(struct kvm_vcpu *vcpu, gpa_t gpa, int writable) static void __kvm_inject_pfault_token(struct kvm_vcpu *vcpu, bool start_token, unsigned long token) { - struct kvm_s390_interrupt inti; - struct kvm_s390_irq irq; + struct kvm_s390_interrupt inti = {}; + struct kvm_s390_irq irq = {}; if (start_token) { irq.u.ext.ext_params2 = token; -- 2.53.0