Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
To: sashiko-bot@kernel.org
Cc: jtornosm@redhat.com, linux-pci@vger.kernel.org,
	sashiko-reviews@lists.linux.dev
Subject: Re: [PATCH v15 2/2] PCI: Add device-specific reset for Qualcomm WCN6855/WCN7850 WLAN
Date: Mon,  5 Oct 2026 13:59:58 +0200	[thread overview]
Message-ID: <20261005115958.111415-1-jtornosm@redhat.com> (raw)
In-Reply-To: <20261005110524.81DFC1F000FF@smtp.kernel.org>

> [Severity: Medium]
> Could this lead to an out-of-bounds MMIO read if the device's BAR 0 is
> shorter than 0x300C?
>
> The code unconditionally accesses offset 0x3008
> (QUALCOMM_WLAN_PCIE_SOC_GLOBAL_RESET) here without verifying if the mapped
> memory region is large enough. If an untrusted hardware actor or a spoofed
> device exposes a smaller BAR 0 (e.g., 4KB), this access could exceed the
> mapped memory boundary and cause a kernel panic due to a page fault.
>
> Would it be safer to verify that pci_resource_len(pdev, 0) is at least
> large enough to contain this offset before mapping and reading it?

These are device-specific resets matched by PCI vendor/device ID, so
the BAR0 layout is known and fixed for these devices. The BAR0 size
for these Qualcomm WLAN devices is well above 0x300C.


  reply	other threads:[~2026-10-05 12:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 10:54 [PATCH v15 0/2] PCI: Add device-specific reset for Qualcomm devices Jose Ignacio Tornos Martinez
2026-10-05 10:54 ` [PATCH v15 1/2] PCI: Add device-specific reset for Qualcomm SDX62/SDX65 modems Jose Ignacio Tornos Martinez
2026-10-05 11:07   ` sashiko-bot
2026-10-05 12:00     ` Jose Ignacio Tornos Martinez
2026-10-05 10:54 ` [PATCH v15 2/2] PCI: Add device-specific reset for Qualcomm WCN6855/WCN7850 WLAN Jose Ignacio Tornos Martinez
2026-10-05 11:05   ` sashiko-bot
2026-10-05 11:59     ` Jose Ignacio Tornos Martinez [this message]
2026-10-05 16:41 ` [PATCH v15 0/2] PCI: Add device-specific reset for Qualcomm devices Bjorn Helgaas

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=20261005115958.111415-1-jtornosm@redhat.com \
    --to=jtornosm@redhat.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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