diff options
Diffstat (limited to 'package/kernel/mac80211/patches/subsys/312-mac80211-airtime-Fix-an-off-by-one-in-ieee80211_calc.patch')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/312-mac80211-airtime-Fix-an-off-by-one-in-ieee80211_calc.patch | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/package/kernel/mac80211/patches/subsys/312-mac80211-airtime-Fix-an-off-by-one-in-ieee80211_calc.patch b/package/kernel/mac80211/patches/subsys/312-mac80211-airtime-Fix-an-off-by-one-in-ieee80211_calc.patch deleted file mode 100644 index 4ff496c12e..0000000000 --- a/package/kernel/mac80211/patches/subsys/312-mac80211-airtime-Fix-an-off-by-one-in-ieee80211_calc.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Dan Carpenter <dan.carpenter@oracle.com> -Date: Tue, 26 Nov 2019 15:09:39 +0300 -Subject: [PATCH] mac80211: airtime: Fix an off by one in - ieee80211_calc_rx_airtime() -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This code was copied from mt76 and inherited an off by one bug from -there. The > should be >= so that we don't read one element beyond -the end of the array. - -Fixes: db3e1c40cf2f ("mac80211: Import airtime calculation code from mt76") -Reported-by: Toke Høiland-Jørgensen <toke@redhat.com> -Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> -Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> -Link: https://lore.kernel.org/r/20191126120910.ftr4t7me3by32aiz@kili.mountain -Signed-off-by: Johannes Berg <johannes.berg@intel.com> ---- - ---- a/net/mac80211/airtime.c -+++ b/net/mac80211/airtime.c -@@ -442,7 +442,7 @@ u32 ieee80211_calc_rx_airtime(struct iee - return 0; - - sband = hw->wiphy->bands[status->band]; -- if (!sband || status->rate_idx > sband->n_bitrates) -+ if (!sband || status->rate_idx >= sband->n_bitrates) - return 0; - - rate = &sband->bitrates[status->rate_idx]; |