lkml.org 
[lkml]   [2021]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[BUG] iwlegacy: 3945-rs: possible null-pointer dereference in il3945_rs_get_rate()
Date
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

\
 
 \ /
  Last update: 2021-07-31 05:40    [W:0.023 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site