From: Alexandru Hossu <hossu.alexandru@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Alexandru Hossu <hossu.alexandru@gmail.com>
Subject: [PATCH v8 0/1] staging: rtl8723bs: fix missing frame length checks in OnAuth()
Date: Mon, 11 May 2026 20:53:13 +0200 [thread overview]
Message-ID: <20260511185314.1625375-1-hossu.alexandru@gmail.com> (raw)
v8, addressing the sashiko review comments on v7.
The Challenge Text IE checks from v7 patch 1 and the OnAuthClient
frame length checks from v7 patch 2 are already in your tree:
9d6d63cf3c37 ("staging: rtl8723bs: fix heap overflow in OnAuthClient shared key path")
6ad4395aab1e ("staging: rtl8723bs: fix missing frame length checks in OnAuthClient")
This single patch adds the remaining fix: frame length guards for the
AP-mode handler OnAuth().
What changed in v8 (compared to v7 patch 2/2):
- The len < WLAN_HDR_A3_LEN guard uses return _FAIL instead of goto
auth_fail. The auth_fail block calls memcpy(pstat->hwaddr, sa, ...)
to build a rejection frame. At that point sa has not been
initialised, so goto auth_fail would copy stack garbage into the
rejection frame's destination address. Since we cannot build a
meaningful rejection without knowing the sender, return _FAIL is
the correct choice.
- A new guard is added before the iv[3] key-index read inside the
GetPrivacy() branch. When the Privacy bit is set, the code computes
iv = pframe + WLAN_HDR_A3_LEN and immediately reads iv[3] without
verifying that len >= WLAN_HDR_A3_LEN + 4. This was a new OOB read
path not present in any earlier version of the patch.
- The len < WLAN_HDR_A3_LEN + offset + 4 check now sets
status = WLAN_STATUS_UNSPECIFIED_FAILURE before goto auth_fail so
that the rejection frame carries a defined status code rather than
whatever happened to be on the stack.
Alexandru Hossu (1):
staging: rtl8723bs: fix missing frame length checks in OnAuth()
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 11 +++++++++++
1 file changed, 11 insertions(+)
--
2.53.0
next reply other threads:[~2026-05-11 18:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 18:53 Alexandru Hossu [this message]
2026-05-11 18:53 ` [PATCH v8 1/1] staging: rtl8723bs: fix missing frame length checks in OnAuth() Alexandru Hossu
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=20260511185314.1625375-1-hossu.alexandru@gmail.com \
--to=hossu.alexandru@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@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