Skip to contentSkip to conversation

cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented

PATCH Applied Ola Olsson 2 participants 2 messages Nov 9, 2015 – Nov 26, 2015 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Ola Olsson

author
#0 lore raw

PATCH 1/1 cfg80211: ocb: Fix null pointer deref if join_ocb is unimplemented

---
 net/wireless/ocb.c |    3 +++
 1 file changed, 3 insertions(+)
net/wireless/ocb.c +3 -0
index c00d4a7..e64dbf1 100644
@@ -29,6 +29,9 @@ int __cfg80211_join_ocb(struct cfg80211_registered_device *rdev,
 	if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_OCB)
 		return -EOPNOTSUPP;
 
+	if (!rdev->ops->join_ocb)
+		return -EOPNOTSUPP;
+
 	if (WARN_ON(!setup->chandef.chan))
 		return -EINVAL;
 
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw

Applied, but only to mac80211-next as it's not really relevant - all drivers actually advertising OCB mode (should) have the pointer, and the iftype is checked here.

johannes