kernel-ark/net/mac80211
Bob Copeland 5ee58d7e6a mac80211: fix minstrel single-rate memory corruption
The minstrel rate controller periodically looks up rate indexes in
a sampling table.  When accessing a specific row and column, minstrel
correctly does a bounds check which, on the surface, appears to handle
the case where mi->n_rates < 2.  However, mi->sample_idx is actually
defined as an unsigned, so the right hand side is taken to be a huge
positive number when negative, and the check will always fail.

Consequently, the RC will overrun the array and cause random memory
corruption when communicating with a peer that has only a single rate.
The max value of mi->sample_idx is around 25 so casting to int should
have no ill effects.

Without the change, uptime is a few minutes under load with an AP
that has a single hard-coded rate, and both the AP and STA could
potentially crash.  With the change, both lasted 12 hours with a
steady load.

Thanks to Ognjen Maric for providing the single-rate clue so I could
reproduce this.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=12490 on the
regression list (also http://bugzilla.kernel.org/show_bug.cgi?id=13000).

Cc: stable@kernel.org
Reported-by: Sergey S. Kostyliov <rathamahata@gmail.com>
Reported-by: Ognjen Maric <ognjen.maric@gmail.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-06-10 13:27:51 -04:00
..
aes_ccm.c
aes_ccm.h
aes_cmac.c mac80211: 802.11w - Add BIP (AES-128-CMAC) 2009-01-29 16:00:02 -05:00
aes_cmac.h mac80211: 802.11w - Add BIP (AES-128-CMAC) 2009-01-29 16:00:02 -05:00
agg-rx.c mac80211: Add a timeout for frames in the RX reorder buffer 2009-05-06 15:15:04 -04:00
agg-tx.c mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
cfg.c cfg80211: add rfkill support 2009-06-03 14:06:14 -04:00
cfg.h
debugfs_key.c mac80211: 802.11w - Use BIP (AES-128-CMAC) 2009-01-29 16:00:03 -05:00
debugfs_key.h mac80211: 802.11w - Use BIP (AES-128-CMAC) 2009-01-29 16:00:03 -05:00
debugfs_netdev.c mac80211: split IBSS/managed code 2009-02-27 14:51:42 -05:00
debugfs_netdev.h
debugfs_sta.c mac80211: 802.11w - STA flag for MFP 2009-01-29 16:00:00 -05:00
debugfs_sta.h
debugfs.c mac80211/cfg80211: move wiphy specific debugfs entries to cfg80211 2009-05-20 14:46:23 -04:00
debugfs.h
driver-ops.h cfg80211: add rfkill support 2009-06-03 14:06:14 -04:00
event.c nl80211: Add Michael MIC failure event 2009-04-22 16:54:28 -04:00
ht.c cfg80211: clean up includes 2009-04-22 16:57:17 -04:00
ibss.c mac80211: fix parameter confusion when finding IBSS 2009-05-20 14:46:36 -04:00
ieee80211_i.h wireless: move some utility functions from mac80211 to cfg80211 2009-05-22 14:06:02 -04:00
iface.c cfg80211: add rfkill support 2009-06-03 14:06:14 -04:00
Kconfig cfg80211: fix Kconfig for users of cfg80211 2009-06-03 14:09:08 -04:00
key.c nl80211: Validate NL80211_ATTR_KEY_SEQ length 2009-05-20 14:46:25 -04:00
key.h nl80211: Add RSC configuration for new keys 2009-05-13 15:44:39 -04:00
led.c
led.h
main.c mac80211: deprecate conf.beacon_int properly 2009-06-03 14:05:09 -04:00
Makefile mac80211: split IBSS/managed code 2009-02-27 14:51:42 -05:00
mesh_hwmp.c mac80211: cancel/restart all timers across suspend/resume 2009-05-20 14:46:25 -04:00
mesh_pathtbl.c
mesh_plink.c mac80211: cancel/restart all timers across suspend/resume 2009-05-20 14:46:25 -04:00
mesh.c mac80211: cancel/restart all timers across suspend/resume 2009-05-20 14:46:25 -04:00
mesh.h wireless: move some utility functions from mac80211 to cfg80211 2009-05-22 14:06:02 -04:00
michael.c
michael.h
mlme.c mac80211: correct probe wait time 2009-05-22 14:06:01 -04:00
pm.c mac80211: cancel/restart all timers across suspend/resume 2009-05-20 14:46:25 -04:00
rate.c mac80211: rate control status only for controlled packets 2009-03-27 20:13:15 -04:00
rate.h mac80211: rate control status only for controlled packets 2009-03-27 20:13:15 -04:00
rc80211_minstrel_debugfs.c
rc80211_minstrel.c mac80211: fix minstrel single-rate memory corruption 2009-06-10 13:27:51 -04:00
rc80211_minstrel.h minstrel: improve performance for non-MRR drivers 2008-10-31 19:00:36 -04:00
rc80211_pid_algo.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-05-18 21:08:20 -07:00
rc80211_pid_debugfs.c mac80211/drivers: rewrite the rate control API 2008-10-31 19:00:23 -04:00
rc80211_pid.h mac80211/drivers: rewrite the rate control API 2008-10-31 19:00:23 -04:00
rx.c wireless: move some utility functions from mac80211 to cfg80211 2009-05-22 14:06:02 -04:00
scan.c mac80211: cancel/restart all timers across suspend/resume 2009-05-20 14:46:25 -04:00
spectmgmt.c mac80211: move channel switch code 2009-05-20 14:46:25 -04:00
sta_info.c mac80211: extend sta kdoc - explain when they are added 2009-06-03 14:06:15 -04:00
sta_info.h mac80211: fix kernel-doc 2009-05-20 14:46:32 -04:00
tkip.c mac80211: add driver ops wrappers 2009-05-06 15:14:37 -04:00
tkip.h
tx.c mac80211: removed unused variable in ieee80211_tx() 2009-06-03 14:06:15 -04:00
util.c cfg80211: add rfkill support 2009-06-03 14:06:14 -04:00
wep.c mac80211: rewrite fragmentation 2009-03-27 20:13:21 -04:00
wep.h
wext.c cfg80211: move txpower wext from mac80211 2009-06-03 14:06:14 -04:00
wme.c wireless: move some utility functions from mac80211 to cfg80211 2009-05-22 14:06:02 -04:00
wme.h mac80211: fix aggregation for hardware with ampdu queues 2009-02-27 14:51:42 -05:00
wpa.c nl80211: Add Michael MIC failure event 2009-04-22 16:54:28 -04:00
wpa.h mac80211: 802.11w - Add BIP (AES-128-CMAC) 2009-01-29 16:00:02 -05:00