]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix use-after-free
authorJohannes Berg <johannes.berg@intel.com>
Fri, 24 Sep 2010 09:20:47 +0000 (11:20 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 24 Sep 2010 19:21:55 +0000 (15:21 -0400)
commita91c4d34b81bfba1f347b2c40e2c0c821f469661
tree45709536e1c4f36c345b16f90849c7833d23337b
parent2a9d685b735f4e90bd97be5e40ae999834dd5b62
mac80211: fix use-after-free

commit e68a81225903165d1eaaa5c61466a2c13768b7e9
Author: Johannes Berg <johannes@sipsolutions.net>
Date:   Wed Nov 25 17:46:15 2009 +0100

    mac80211: move cmntr flag out of rx flags

moved the CMTR flag into the skb's status, and
in doing so introduced a use-after-free -- when
the skb has been handed to cooked monitors the
status setting will touch now invalid memory.

Additionally, moving it there has effectively
discarded the optimisation -- since the bit is
only ever set on freed SKBs, and those were a
copy, it could never be checked.

For the current release, fixing this properly
is a bit too involved, so let's just remove the
problematic code and leave userspace with one
copy of each frame for each virtual interface.

Cc: stable@kernel.org [2.6.33+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/rx.c