]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 19 Nov 2014 17:38:18 +0000 (18:38 +0100)
commit8384cbafb34d6abfe75dbc2d9b4f42302ad3edae
tree50287dd16f1838fc6228f6210e663e7cbaabba10
parente7ba6308e5c4725632baf8a55332b050e510af5d
mac80211: fix use-after-free in defragmentation

commit b8fff407a180286aa683d543d878d98d9fc57b13 upstream.

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.

Reported-by: Yosef Khyal <yosefx.khyal@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
net/mac80211/rx.c