From: Greg KH <gregkh@linuxfoundation.org>
To: Moksh Panicker <mokshpanicker.7@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, skhan@linuxfoundation.org
Subject: Re: [PATCH] staging: rtl8723bs: fix OOB reads in rtw_get_wps_ie()
Date: Tue, 7 Jul 2026 13:30:25 +0200 [thread overview]
Message-ID: <2026070712-gift-curtly-5f96@gregkh> (raw)
In-Reply-To: <20260625202911.26782-1-mokshpanicker.7@gmail.com>
On Thu, Jun 25, 2026 at 08:29:11PM +0000, Moksh Panicker wrote:
> rtw_get_wps_ie() iterates over IE data from network frames without
> validating that the IE header and payload fit within the remaining
> buffer before reading them. Specifically:
>
> - in_ie[cnt + 1] is read without checking cnt + 1 < in_len
> - memcmp(&in_ie[cnt + 2], ...) accesses cnt + 2 without bounds check
> - in_ie[cnt + 1] is used as length without verifying payload fits
>
> Add bounds checks at the top of the loop body to break early if fewer
> than 2 bytes remain for the IE header, or if the declared payload
> extends past the end of the buffer. Also require at least 4 bytes of
> payload before comparing the WPS OUI.
>
> Fixes: 554c0a3abf21 ("staging: rtl8723bs: add r8723bs driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
> ---
> drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
How was this issue found? How was it tested?
thanks,
greg k-h
next prev parent reply other threads:[~2026-07-07 11:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 20:29 [PATCH] staging: rtl8723bs: fix OOB reads in rtw_get_wps_ie() Moksh Panicker
2026-07-07 11:30 ` Greg KH [this message]
2026-07-07 14:20 ` Moksh Panicker
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=2026070712-gift-curtly-5f96@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mokshpanicker.7@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=stable@vger.kernel.org \
/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