From: Ping-Ke Shih <pkshih@realtek.com>
To: Yi Cong <cong.yi@linux.dev>, <pkshih@realtek.com>,
<Jes.Sorensen@gmail.com>
Cc: <linux-wireless@vger.kernel.org>, Yi Cong <yicong@kylinos.cn>,
<stable@vger.kernel.org>
Subject: Re: [PATCH v2] wifi: rtl8xxxu: fix potential use of uninitialized value
Date: Mon, 16 Mar 2026 13:55:32 +0800 [thread overview]
Message-ID: <7d04bb47-4715-4f1e-92a5-4d57356fb6e2@RTKEXHMBS06.realtek.com.tw> (raw)
In-Reply-To: <20260306071627.56501-1-cong.yi@linux.dev>
Yi Cong <cong.yi@linux.dev> wrote:
> From: Yi Cong <yicong@kylinos.cn>
>
> The local variables 'mcs' and 'nss' in rtl8xxxu_update_ra_report() are
> passed to rtl8xxxu_desc_to_mcsrate() as output parameters. If the helper
> function encounters an unhandled rate index, it may return without setting
> these values, leading to the use of uninitialized stack data.
>
> Remove the helper rtl8xxxu_desc_to_mcsrate() and inline the logic into
> rtl8xxxu_update_ra_report(). This fixes the use of uninitialized 'mcs'
> and 'nss' variables for legacy rates.
>
> The new implementation explicitly handles:
> - Legacy rates: Set bitrate only.
> - HT rates (MCS0-15): Set MCS flags, index, and NSS (1 or 2) directly.
> - Invalid rates: Return early.
>
> Fixes: 7de16123d9e2 ("wifi: rtl8xxxu: Introduce rtl8xxxu_update_ra_report")
> Cc: stable@vger.kernel.org
> Suggested-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Yi Cong <yicong@kylinos.cn>
> Link: https://lore.kernel.org/all/96e31963da0c42dcb52ce44f818963d7@realtek.com/
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
f8a2fc809bfe wifi: rtl8xxxu: fix potential use of uninitialized value
---
https://github.com/pkshih/rtw.git
prev parent reply other threads:[~2026-03-16 5:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 7:16 [PATCH v2] wifi: rtl8xxxu: fix potential use of uninitialized value Yi Cong
2026-03-16 5:55 ` Ping-Ke Shih [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=7d04bb47-4715-4f1e-92a5-4d57356fb6e2@RTKEXHMBS06.realtek.com.tw \
--to=pkshih@realtek.com \
--cc=Jes.Sorensen@gmail.com \
--cc=cong.yi@linux.dev \
--cc=linux-wireless@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yicong@kylinos.cn \
/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