public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@linux.ibm.com>
To: Junrui Luo <moonafterrain@outlook.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Claudio Imbrenda <imbrenda@linux.ibm.com>,
	David Hildenbrand <david@kernel.org>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Matthew Rosato <mjrosato@linux.ibm.com>,
	Farhan Ali <alifm@linux.ibm.com>,
	Eric Farman <farman@linux.ibm.com>,
	Niklas Schnelle <schnelle@linux.ibm.com>,
	Pierre Morel <pmorel@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-kernel@vger.kernel.org, Yuhao Jiang <danisjiang@gmail.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH] KVM: s390: pci: fix GAIT table indexing due to double-scaling pointer arithmetic
Date: Fri, 17 Apr 2026 09:48:59 +0200	[thread overview]
Message-ID: <e381b39f-0075-43c2-be8c-131c553702f1@linux.ibm.com> (raw)
In-Reply-To: <SYBPR01MB7881AB7449FEB6B58E4BA6F2AF222@SYBPR01MB7881.ausprd01.prod.outlook.com>

Am 15.04.26 um 11:26 schrieb Junrui Luo:
> kvm_s390_pci_aif_enable(), kvm_s390_pci_aif_disable(), and
> aen_host_forward() index the GAIT by manually multiplying the index
> with sizeof(struct zpci_gaite).
> 
> Since aift->gait is already a struct zpci_gaite pointer, this
> double-scales the offset, accessing element aisb*16 instead of aisb.
> 
> This causes out-of-bounds accesses when aisb >= 32 (with
> ZPCI_NR_DEVICES=512)
> 
> Fix by removing the erroneous sizeof multiplication.
> 
> Fixes: 3c5a1b6f0a18 ("KVM: s390: pci: provide routines for enabling/disabling interrupt forwarding")
> Fixes: 73f91b004321 ("KVM: s390: pci: enable host forwarding of Adapter Event Notifications")
> Reported-by: Yuhao Jiang <danisjiang@gmail.com>
> Cc: stable@vger.kernel.org
> Signed-off-by: Junrui Luo <moonafterrain@outlook.com>

thanks, applied.

      parent reply	other threads:[~2026-04-17  7:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-15  9:26 [PATCH] KVM: s390: pci: fix GAIT table indexing due to double-scaling pointer arithmetic Junrui Luo
2026-04-16 13:06 ` Christian Borntraeger
2026-04-16 19:46   ` Matthew Rosato
2026-04-17  5:44     ` Junrui Luo
2026-04-17  7:48 ` Christian Borntraeger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e381b39f-0075-43c2-be8c-131c553702f1@linux.ibm.com \
    --to=borntraeger@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=alifm@linux.ibm.com \
    --cc=danisjiang@gmail.com \
    --cc=david@kernel.org \
    --cc=farman@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjrosato@linux.ibm.com \
    --cc=moonafterrain@outlook.com \
    --cc=pmorel@linux.ibm.com \
    --cc=schnelle@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=svens@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox