]> 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)
commitf60baa06f1ac16c892358e21dc9733d58c54b7eb
tree2e509ae3f6f16d1e1da195f5a4a65e77c4c7133f
parentb341495e9866b385667cb8476b3c3784e0a50c32
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