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 60DF6531AE8; Wed, 30 Sep 2026 17:39: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=1790789986; cv=none; b=M24jLA3o9GT0r2BDcEXeT6ex6oona/dod/GCndPvol5r0em16iN1Em2goQEzvgrUpYy9/emG384s4Yd/oM/PnFqLtxzFoy/GbqmxuOb293yMDyH2CpRTD4cfa5GrAGpjlxsjhhwTVcB3Pafxk8S++iazGbAO3kkvHPWkCHEV9dA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790789986; c=relaxed/simple; bh=L9vWMlmuo8G/8UBE4cVMWB+uI/mw8sXy16i122QkonU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TtA/+dpT5t+fr2uj//SIxU/QYJkpS13Yy/OJJqUXqWrqs2aGgibMIyoU6rzXSt6voxBu0o0ze85pgbQAPgj01Njmgt1Ye61z4tKUzO9dlsUgq4F6O8+eEdWwIX8LSEXVdtviFe21UE3sGEkrTSwbPCG1jblqEYkrAkrQdPBm6VE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LrAeXfxC; 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="LrAeXfxC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9CA31F000FF; Wed, 30 Sep 2026 17:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790789985; bh=FU3Bei0xAQn/WpgyT09Ikd6Q+lgIi9u9v0FLGLmwZzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LrAeXfxCYN4qVuVR47hmne1y27eGwVQOgV3qhKy/YYhGBFQKQfOJzBxlsktJbj7ZS z4hoAAgP4lM9DXrxkk3N6//S99GKq8K4RESrMfJa2tUMyyA1F1kd8dIi5QUNvhK1KG 82zYETI7ThcZXk/wXM3CkTcAQ671POvU/9OORdvk= 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.12 669/877] KVM: s390: Zero initialize data structures for inject_pfault_token Date: Wed, 30 Sep 2026 17:26:20 +0200 Message-ID: <20260930152429.104572269@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152414.738996857@linuxfoundation.org> References: <20260930152414.738996857@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.12-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 @@ -4601,8 +4601,8 @@ long kvm_arch_fault_in_page(struct kvm_v 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;