]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mac80211: zero initialize count field in ieee80211_tx_rate
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Mon, 20 Feb 2012 04:35:31 +0000 (10:05 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Mar 2012 19:31:26 +0000 (12:31 -0700)
commit2e4c9873deea81f89798b709622bdbdec88502db
treeb4a4025aba7b390e1017db51806cfe12be65188f
parent88d7d4e4a439f32acc56a6d860e415ee71d3df08
mac80211: zero initialize count field in ieee80211_tx_rate

commit 8617b093d0031837a7be9b32bc674580cfb5f6b5 upstream.

rate control algorithms concludes the rate as invalid
with rate[i].idx < -1 , while they do also check for rate[i].count is
non-zero. it would be safer to zero initialize the 'count' field.
recently we had a ath9k rate control crash where the ath9k rate control
in ath_tx_status assumed to check only for rate[i].count being non-zero
in one instance and ended up in using invalid rate index for
'connection monitoring NULL func frames' which eventually lead to the crash.
thanks to Pavel Roskin for fixing it and finding the root cause.
https://bugzilla.redhat.com/show_bug.cgi?id=768639

Cc: Pavel Roskin <proski@gnu.org>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/mac80211/rate.c