Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Feb 2017 03:45:41 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r313983 - head/sys/net80211
Message-ID:  <201702200345.v1K3jft5060901@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Mon Feb 20 03:45:41 2017
New Revision: 313983
URL: https://svnweb.freebsd.org/changeset/base/313983

Log:
  [net80211] fix NULL pointer dereference in VHT operation in hostap mode.
  
  The vht IEs are NULL at this point, so we shouldn't upgrade a node to VHT.
  I'll fix the upgrade after this!
  
  Tested:
  
  * ath10k, hostap mode

Modified:
  head/sys/net80211/ieee80211_hostap.c

Modified: head/sys/net80211/ieee80211_hostap.c
==============================================================================
--- head/sys/net80211/ieee80211_hostap.c	Mon Feb 20 03:43:12 2017	(r313982)
+++ head/sys/net80211/ieee80211_hostap.c	Mon Feb 20 03:45:41 2017	(r313983)
@@ -2151,7 +2151,9 @@ hostap_recv_mgmt(struct ieee80211_node *
 		ni->ni_chan = vap->iv_bss->ni_chan;
 
 		/* VHT */
-		if (IEEE80211_IS_CHAN_VHT(ni->ni_chan)) {
+		if (IEEE80211_IS_CHAN_VHT(ni->ni_chan) &&
+		    htcap != NULL &&
+		    vhtinfo != NULL) {
 			/* XXX TODO; see below */
 			printf("%s: VHT TODO!\n", __func__);
 			ieee80211_vht_node_init(ni);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702200345.v1K3jft5060901>