public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Krzysztof Wilczyński" <kw@linux.com>
To: Alexandra Diupina <adiupina@astralinux.ru>
Cc: Xiaowei Song <songxiaowei@hisilicon.com>,
	Binghui Wang <wangbinghui@hisilicon.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org
Subject: Re: [PATCH] PCI: kirin: Fix buffer overflow
Date: Fri, 6 Sep 2024 15:42:14 +0900	[thread overview]
Message-ID: <20240906064214.GC679795@rocinante> (raw)
In-Reply-To: <20240903115823.30647-1-adiupina@astralinux.ru>

Hello,

By the way, this would be v2, technically, but not to worry.

> In kirin_pcie_parse_port() pcie->num_slots is compared to
> pcie->gpio_id_reset size (MAX_PCI_SLOTS). Need to fix
> condition to pcie->num_slots + 1 >= MAX_PCI_SLOTS and move
> pcie->num_slots increment lower to avoid out-of-bounds
> array access.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.

Applied to controller/kirin, thank you!

[1/1] PCI: kirin: Fix buffer overflow in kirin_pcie_parse_port()
      https://git.kernel.org/pci/pci/c/c500a86693a1

	Krzysztof

  reply	other threads:[~2024-09-06  6:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 11:58 [PATCH] PCI: kirin: Fix buffer overflow Alexandra Diupina
2024-09-06  6:42 ` Krzysztof Wilczyński [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-12  8:43 Alexandra Diupina
2024-07-12  9:07 ` Mauro Carvalho Chehab

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=20240906064214.GC679795@rocinante \
    --to=kw@linux.com \
    --cc=adiupina@astralinux.ru \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=mchehab+huawei@kernel.org \
    --cc=robh@kernel.org \
    --cc=songxiaowei@hisilicon.com \
    --cc=wangbinghui@hisilicon.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