]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix use-after-free in defragmentation
authorJohannes Berg <johannes.berg@intel.com>
Mon, 3 Nov 2014 12:57:46 +0000 (13:57 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 3 Nov 2014 13:28:50 +0000 (14:28 +0100)
commit85a15dcacdba5cd220e5f18fe613643ce2892b36
tree2e509ae3f6f16d1e1da195f5a4a65e77c4c7133f
parent0d191b41467facb63dfda6aae765878fa30b8036
mac80211: fix use-after-free in defragmentation

Upon receiving the last fragment, all but the first fragment
are freed, but the multicast check for statistics at the end
of the function refers to the current skb (the last fragment)
causing a use-after-free bug.

Since multicast frames cannot be fragmented and we check for
this early in the function, just modify that check to also
do the accounting to fix the issue.

Cc: stable@vger.kernel.org
Reported-by: Yosef Khyal <yosefx.khyal@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c