Skip to content

Commit

Permalink
mac80211: fix read outside array bounds
Browse files Browse the repository at this point in the history
ieee802_1d_to_ac is defined as a const int[8],
but the tid parameter has a range from 0 to 15.

Cc: stable@vger.kernel.org
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Jul 10, 2012
1 parent f8bf65b commit 353d09c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2733,7 +2733,7 @@ EXPORT_SYMBOL(ieee80211_get_buffered_bc);
void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, int tid)
{
int ac = ieee802_1d_to_ac[tid];
int ac = ieee802_1d_to_ac[tid & 7];

skb_set_mac_header(skb, 0);
skb_set_network_header(skb, 0);
Expand Down

0 comments on commit 353d09c

Please sign in to comment.