Hello Felix Fietkau,

The patch 6d7b97b23e11: "ath5k: fix tx status reporting issues" from 
Apr 9, 2011, leads to the following
static checker warning: "drivers/net/wireless/ath/ath5k/base.c:1683 
ath5k_tx_frame_completed()
         error: buffer overflow 'info->status.rates' 4 <= 4"

drivers/net/wireless/ath/ath5k/base.c
  1675          for (i = 0; i < ts->ts_final_idx; i++) {
  1676                  struct ieee80211_tx_rate *r =
  1677                          &info->status.rates[i];
  1678  
  1679                  r->count = tries[i];
  1680          }
  1681  
  1682          info->status.rates[ts->ts_final_idx].count = ts->ts_final_retry;
  1683          info->status.rates[ts->ts_final_idx + 1].idx = -1;
                                   ^^^^^^^^^^^^^^^^^^^^
It's complaining about this.

  1684  

->ts_final_idx is set in ath5k_hw_proc_4word_tx_status() it comes from
the hardware but in theory it could be a number between 0-3...  I'm not
sure.

regards,
dan carpenter

_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to