mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
iwlwifi: dvm: prevent an out of bounds access
commit 0b0f934e92 upstream.
iwlagn_check_ratid_empty takes the tid as a parameter, but
it doesn't check that it is not IWL_TID_NON_QOS.
Since IWL_TID_NON_QOS = 8 and iwl_priv::tid_data is an array
with 8 entries, accessing iwl_priv::tid_data[IWL_TID_NON_QOS]
is a bad idea.
This happened in iwlagn_rx_reply_tx. Since
iwlagn_check_ratid_empty is relevant only to check whether
we can open A-MPDU, this flow is irrelevant if tid is
IWL_TID_NON_QOS. Call iwlagn_check_ratid_empty only inside
the
if (tid != IWL_TID_NON_QOS)
a few lines earlier in the function.
Reported-by: Seraphime Kirkovski <kirkseraph@gmail.com>
Tested-by: Seraphime Kirkovski <kirkseraph@gmail.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
61a0adbfaa
commit
de8c33290f
@@ -1190,11 +1190,11 @@ void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb)
|
|||||||
next_reclaimed;
|
next_reclaimed;
|
||||||
IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
|
IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
|
||||||
next_reclaimed);
|
next_reclaimed);
|
||||||
|
iwlagn_check_ratid_empty(priv, sta_id, tid);
|
||||||
}
|
}
|
||||||
|
|
||||||
iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);
|
iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);
|
||||||
|
|
||||||
iwlagn_check_ratid_empty(priv, sta_id, tid);
|
|
||||||
freed = 0;
|
freed = 0;
|
||||||
|
|
||||||
/* process frames */
|
/* process frames */
|
||||||
|
|||||||
Reference in New Issue
Block a user