linux/drivers/net/wireless/iwlwifi
Johannes Berg 827d42c9ac mac80211: fix spurious delBA handling
Lennert Buytenhek noticed that delBA handling in mac80211
was broken and has remotely triggerable problems, some of
which are due to some code shuffling I did that ended up
changing the order in which things were done -- this was

  commit d75636ef9c
  Author: Johannes Berg <johannes@sipsolutions.net>
  Date:   Tue Feb 10 21:25:53 2009 +0100

    mac80211: RX aggregation: clean up stop session

and other parts were already present in the original

  commit d92684e660
  Author: Ron Rindjunsky <ron.rindjunsky@intel.com>
  Date:   Mon Jan 28 14:07:22 2008 +0200

      mac80211: A-MPDU Tx add delBA from recipient support

The first problem is that I moved a BUG_ON before various
checks -- thereby making it possible to hit. As the comment
indicates, the BUG_ON can be removed since the ampdu_action
callback must already exist when the state is != IDLE.

The second problem isn't easily exploitable but there's a
race condition due to unconditionally setting the state to
OPERATIONAL when a delBA frame is received, even when no
aggregation session was ever initiated. All the drivers
accept stopping the session even then, but that opens a
race window where crashes could happen before the driver
accepts it. Right now, a WARN_ON may happen with non-HT
drivers, while the race opens only for HT drivers.

For this case, there are two things necessary to fix it:
 1) don't process spurious delBA frames, and be more careful
    about the session state; don't drop the lock

 2) HT drivers need to be prepared to handle a session stop
    even before the session was really started -- this is
    true for all drivers (that support aggregation) but
    iwlwifi which can be fixed easily. The other HT drivers
    (ath9k and ar9170) are behaving properly already.

Reported-by: Lennert Buytenhek <buytenh@marvell.com>
Cc: stable@kernel.org
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-30 13:55:51 -05:00
..
iwl3945-base.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-10-15 15:03:17 -07:00
iwl-1000.c iwlwifi: Fix issue on file transfer stalled in HT mode 2009-11-10 16:24:16 -05:00
iwl-3945-fh.h
iwl-3945-hw.h iwlwifi: name changed from "fat" to "ht40" 2009-08-14 09:13:46 -04:00
iwl-3945-led.c iwlwifi: remove command callback return value 2009-07-27 15:24:22 -04:00
iwl-3945-led.h
iwl-3945-rs.c iwlwifi: use %pM for formatted MAC addresses 2009-10-07 16:33:51 -04:00
iwl-3945.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-10-15 15:03:17 -07:00
iwl-3945.h iwlwifi: fix 3945 ucode info retrieval after failure 2009-09-28 16:55:05 -04:00
iwl-4965-hw.h iwlwifi: name changed from "fat" to "ht40" 2009-08-14 09:13:46 -04:00
iwl-4965.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
iwl-5000-hw.h iwlwifi: Temperature sensor voltage reading for 5150 2009-05-22 14:06:03 -04:00
iwl-5000.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-10-15 15:03:17 -07:00
iwl-6000-hw.h
iwl-6000.c iwlwifi: Use RTS/CTS as the preferred protection mechanism for 6000 series 2009-11-10 16:23:58 -05:00
iwl-agn-rs.c iwlwifi: Use RTS/CTS as the preferred protection mechanism for 6000 series 2009-11-10 16:23:58 -05:00
iwl-agn-rs.h iwlwifi: remove 60 Mbps from sband bitrates table 2009-08-31 14:42:09 -04:00
iwl-agn.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-11-18 14:54:45 -08:00
iwl-calib.c iwlwifi: automatically adjust sleep level 2009-08-14 09:13:50 -04:00
iwl-calib.h
iwl-commands.h iwlwifi: fix compile warning 2009-10-07 16:33:50 -04:00
iwl-core.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
iwl-core.h iwlwifi: Use RTS/CTS as the preferred protection mechanism for 6000 series 2009-11-10 16:23:58 -05:00
iwl-csr.h iwlwifi: Distinguish power amplifier for 6000 series 2009-08-04 16:44:22 -04:00
iwl-debug.h iwlwifi: show current tx power 2009-08-28 14:40:37 -04:00
iwl-debugfs.c iwlwifi: fix 3945 ucode info retrieval after failure 2009-09-28 16:55:05 -04:00
iwl-dev.h iwlwifi: fix ICT irq table endianness 2009-08-28 14:40:53 -04:00
iwl-eeprom.c iwlwifi: incorrect method used for finding valid OTP blocks 2009-10-07 16:33:49 -04:00
iwl-eeprom.h iwlwifi: fix EEPROM enhance tx power offset 2009-10-07 16:33:50 -04:00
iwl-fh.h
iwl-hcmd.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
iwl-helpers.h iwlwifi: change iwl_enable/disable_interrupts to "inline" 2009-07-24 15:05:26 -04:00
iwl-io.h iwlcore: register locks 2009-05-22 14:06:04 -04:00
iwl-led.c iwlwifi: Traffic type and counter for debugFs 2009-08-14 09:13:47 -04:00
iwl-led.h
iwl-power.c iwlwifi: disable powersave for 4965 2009-09-23 11:35:40 -04:00
iwl-power.h iwlwifi: automatically adjust sleep level 2009-08-14 09:13:50 -04:00
iwl-prph.h iwlagn: modify digital SVR for 1000 2009-07-24 15:05:23 -04:00
iwl-rx.c iwlwifi: fix compile warning 2009-10-07 16:33:50 -04:00
iwl-scan.c iwlwifi: fix unloading driver while scanning 2009-08-28 14:40:39 -04:00
iwl-spectrum.c
iwl-spectrum.h
iwl-sta.c iwlwifi: do not send sync command while holding spinlock 2009-09-23 11:35:53 -04:00
iwl-sta.h iwlwifi: unify station management 2009-06-04 10:56:20 -04:00
iwl-tx.c mac80211: fix spurious delBA handling 2009-11-30 13:55:51 -05:00
Kconfig iwlwifi: fix LED config option 2009-07-27 15:24:27 -04:00
Makefile iwlwifi: port to cfg80211 rfkill 2009-06-10 13:27:49 -04:00