Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [BUG] iwlegacy: 3945-rs: possible null-pointer dereference in il3945_rs_get_rate()
@ 2021-07-31  3:39 Li Tuo
  0 siblings, 0 replies; only message in thread
From: Li Tuo @ 2021-07-31  3:39 UTC (permalink / raw)
  To: stf_xl, kvalo, davem, kuba
  Cc: linux-wireless, netdev, linux-kernel, baijiaju1990

Hello,

Our static analysis tool finds a possible null-pointer dereference in 
the iwlegacy driver in Linux 5.14.0-rc3:

The variable rs_sta is checked in:
629:    if (rs_sta && !rs_sta->il)

This indicates that rs_sta can be NULL.
If so, some null-pointer dereferences will occur in some statements such as:
643:    idx = min(rs_sta->last_txrate_idx & 0xffff, RATE_COUNT_3945 - 1);
653:    if (rs_sta->start_rate != RATE_INVALID)

I am not quite sure whether this possible null-pointer dereference is 
real and how to fix it if it is real.
Any feedback would be appreciated, thanks!

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>

Best wishes,
Tuo Li

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-31  3:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-31  3:39 [BUG] iwlegacy: 3945-rs: possible null-pointer dereference in il3945_rs_get_rate() Li Tuo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).