On 29 May 2015 at 13:10, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > On Fri, 2015-05-22 at 10:57 +0200, Michal Kazior wrote: >> It was possible for mac80211 to be coerced into an >> unexpected flow causing sdata union to become >> corrupted. Station pointer was put into >> sdata->u.vlan.sta memory location while it was >> really master AP's sdata->u.ap.next_beacon. This >> led to station entry being later freed as >> next_beacon before __sta_info_flush() in >> ieee80211_stop_ap() and a subsequent invalid >> pointer dereference crash. >> >> The problem was that ieee80211_ptr->use_4addr >> wasn't cleared on interface type changes. [...] >> Even though this can and should be fixed in >> cfg80211 it still makes sense to add a sanity >> check to mac80211 to prevent future problems. > > I'm a bit undecided about this. Is this really the only place that > assumes use_4addr implies that it's a VLAN, in a context like this? Hmm.. I guess TDLS could also have use_4addr and still be a IFTYPE_STATION, right? In which case parent condition should be modified instead: if (vlansdata->vif.type == NL80211_IFTYPE_AP_VLAN && params->vlan->ieee80211_ptr->use_4addr) { ... Michał -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html