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 9E3794BEE54; Sat, 12 Sep 2026 09:37:45 +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=1789205866; cv=none; b=GJ0ID3Ihs7AHxobb2M+zh/r7I+j6JcX9gqvwaQOK8+FTtQHKQjXshsbIl12saxoc/xr0/JNvpwB1EcqX/H3QOSopGmwIc/bXr1FjbDocHDp/tpfaS/x8wlJMbC0x6Sx+ZfbnWA+hIqz/QN/0KhqrbGb5LiYoKnqW9rt7JGZpW/s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789205866; c=relaxed/simple; bh=4hMLStrp4RpIEnoMvfJfZC5dQBwegO/taFHBo2WQf8w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BdN0CJxeaqNUQF8GzeMcxs/XfOROnVyZhabpOEyUWbrKrI03ueDmxCRDZEjpNC4vHoAENAB8ZHemA3p4CVdZ5Xh7kqS5JteQXTnt0YKXDCybd4tSl2MmAqLiCZ6X/uyaAbf16+HeyEhXkaNw5al1nkUSmgT1ZK9j3XVlrMWtLmc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vc1vWPje; 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="vc1vWPje" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4B201F000FF; Sat, 12 Sep 2026 09:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789205865; bh=p91GwitByasPQbovATXArd4Srrom9R3jPMi/K/EhvbE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vc1vWPjenRUwr/2JzxB1AIq4GFMKDlg2jY5/0xFK0bZmeCFONqb/N/lRufFBV4kCD 0CBgRGJzd2FfW+G1rdAzdkEGg9yzpCq6wyfntahL1BTsSAjdBLySR79DPjpUD9LWRA sSzS6Bgb/DVV0AFAaeRUMAcbdPj19fZzKkOMLQWA= 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.18 0087/1518] KVM: s390: Zero initialize data structures for inject_pfault_token Date: Sat, 12 Sep 2026 08:37:36 +0200 Message-ID: <20260912065625.431655891@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065623.398859879@linuxfoundation.org> References: <20260912065623.398859879@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.18-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 Signed-off-by: Greg Kroah-Hartman --- arch/s390/kvm/kvm-s390.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -4705,8 +4705,8 @@ int kvm_s390_try_set_tod_clock(struct kv 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;