From: Johannes Berg <johannes@sipsolutions.net>
To: Stanislaw Gruszka <stf_xl@wp.pl>, Tuo Li <islituo@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] wifi: iwlegacy: 3945-rs: fix possible null-pointer dereferences in il3945_rs_get_rate()
Date: Thu, 08 Jan 2026 13:02:13 +0100 [thread overview]
Message-ID: <d1806eda47fcb78344ed952e2a91b9c178650689.camel@sipsolutions.net> (raw)
In-Reply-To: <20260107085949.GA35258@wp.pl> (sfid-20260107_100022_894196_B0F8671D)
On Wed, 2026-01-07 at 09:59 +0100, Stanislaw Gruszka wrote:
> On Wed, Jan 07, 2026 at 04:41:49PM +0800, Tuo Li wrote:
> > In this function, il_sta is assigned to rs_sta, and rs_sta is dereferenced
> > at several points. If il_sta is NULL, this can lead to null-pointer
> > dereferences. To fix this issue, add an early check for il_sta and return
> > if it is NULL, consistent with the handling in il3945_rs_tx_status().
> >
> > Besides, if the STA il data is uninitialized, return early instead of
> > setting il_sta to NULL, consistent with the handling in
> > il3945_rs_tx_status().
> >
> > Signed-off-by: Tuo Li <islituo@gmail.com>
> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
I can apply this if you want, but for the record,
> > +++ b/drivers/net/wireless/intel/iwlegacy/3945-rs.c
> > @@ -626,10 +626,15 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
> >
> > D_RATE("enter\n");
> >
> > + if (!il_sta) {
> > + D_RATE("leave: No STA il data to update!\n");
> > + return;
> > + }
> > +
I don't see how this would be possible. _Maybe_ the other one, but I
can't figure out any scenario in mac80211 where it could happen either.
johannes
next prev parent reply other threads:[~2026-01-08 12:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 8:41 Tuo Li
2026-01-07 8:59 ` Stanislaw Gruszka
2026-01-08 12:02 ` Johannes Berg [this message]
2026-01-08 13:28 ` Tuo Li
2026-01-08 16:33 ` Stanislaw Gruszka
2026-01-09 2:42 ` Tuo Li
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=d1806eda47fcb78344ed952e2a91b9c178650689.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=islituo@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=stf_xl@wp.pl \
/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
all inboxes | Powered by JetHome®