Bug 541149 (CVE-2009-4026, CVE-2009-4027) - CVE-2009-4026 CVE-2009-4027 kernel: mac80211: fix spurious delBA handling
Summary: CVE-2009-4026 CVE-2009-4027 kernel: mac80211: fix spurious delBA handling
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2009-4026, CVE-2009-4027
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 541151 541152
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-25 03:28 UTC by Eugene Teo (Security Response)
Modified: 2019-09-29 12:33 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-21 22:05:44 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0178 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.5 kernel security and bug fix update 2010-03-29 12:18:21 UTC
Red Hat Product Errata RHSA-2010:0380 0 normal SHIPPED_LIVE Important: kernel security and bug fix update 2010-04-27 12:46:01 UTC

Description Eugene Teo (Security Response) 2009-11-25 03:28:36 UTC
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 d75636ef9c1af224f1097941879d5a8db7cd04e5
  Author: Johannes Berg <johannes>
  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 d92684e66091c0f0101819619b315b4bb8b5bcc5
  Author: Ron Rindjunsky <ron.rindjunsky>
  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.

Comment 4 Eugene Teo (Security Response) 2009-12-01 04:08:08 UTC
Upstream commit:
http://git.kernel.org/linus/4253119acf412fd686ef4bd8749b5a4d70ea3a51
http://git.kernel.org/linus/827d42c9ac91ddd728e4f4a31fefb906ef2ceff7

Commits 4253119a and 827d42c9 (first problem) = CVE-2009-4026
Commit 827d42c9 (second problem) = CVE-2009-4027

Note that CVE-2009-4026 did not affect the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 3, 4, 5 and Red Hat Enterprise MRG. 

CVE-2009-4027 did not affect the versions of the Linux kernel as shipped with Red Hat Enterprise Linux 3, 4 and Red Hat Enterprise MRG. We will be addressing this in Red Hat Enterprise Linux 5 soon.

Comment 7 Chuck Ebbert 2009-12-08 22:57:13 UTC
Both fixes are now in upstream kernel 2.6.31.7

Comment 8 errata-xmlrpc 2010-03-30 06:49:05 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2010:0178 https://rhn.redhat.com/errata/RHSA-2010-0178.html

Comment 11 errata-xmlrpc 2010-04-27 12:46:04 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5.4.Z - Server Only

Via RHSA-2010:0380 https://rhn.redhat.com/errata/RHSA-2010-0380.html


Note You need to log in before you can comment on or make changes to this bug.