From: Tristan Madani <tristmd@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: arend.vanspriel@broadcom.com, brcm80211@lists.linux.dev,
brcm80211-dev-list.pdl@broadcom.com, fariyaf@gmail.com,
linville@tuxdriver.com, kvalo@kernel.org,
linux-kernel@vger.kernel.org,
Tristan Madani <tristan@talencesecurity.com>,
stable@vger.kernel.org
Subject: [PATCH wireless 2/2] wifi: rsi: zero-pad SDIO TX to block boundary
Date: Mon, 2 Nov 2026 12:23:11 +0000 [thread overview]
Message-ID: <20261102122311.181075-3-tristmd@gmail.com> (raw)
In-Reply-To: <20261102122311.181075-1-tristmd@gmail.com>
From: Tristan Madani <tristan@talencesecurity.com>
rsi_sdio_host_intf_write_pkt() rounds the packet length up to the SDIO
block size and passes the larger length to
rsi_sdio_write_register_multiple(). When the packet is not
block-aligned, the SDIO controller reads past the original data into
adjacent heap memory, leaking stale kernel data to the wireless device.
Zero-fill the padding before the SDIO write.
Fixes: dad0d04fa7ba ("rsi: Add RS9113 wireless driver")
Cc: stable@vger.kernel.org
Signed-off-by: Tristan Madani <tristan@talencesecurity.com>
---
drivers/net/wireless/rsi/rsi_91x_sdio.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index bfa386b820d89..8bfb08306d03c 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -772,6 +772,9 @@ static int rsi_sdio_host_intf_write_pkt(struct rsi_hw *adapter,
address = (num_blocks * block_size | (queueno << 12));
length = num_blocks * block_size;
+ if (length > len)
+ memset((u8 *)pkt + len, 0, length - len);
+
status = rsi_sdio_write_register_multiple(adapter,
address,
(u8 *)pkt,
--
2.47.3
prev parent reply other threads:[~2026-11-02 12:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 12:23 [PATCH wireless 0/2] wifi: zero-pad SDIO writes to avoid leaking heap data Tristan Madani
2026-11-02 12:23 ` [PATCH wireless 1/2] wifi: brcmfmac: zero-pad SDIO write to 4-byte boundary Tristan Madani
2026-11-02 12:23 ` Tristan Madani [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=20261102122311.181075-3-tristmd@gmail.com \
--to=tristmd@gmail.com \
--cc=arend.vanspriel@broadcom.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=brcm80211@lists.linux.dev \
--cc=fariyaf@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=stable@vger.kernel.org \
--cc=tristan@talencesecurity.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