⬢ DragonFlyBSD Kernel Audit
DF-3416 / fix.diff
← back to finding ↓ download raw
--- a/sys/netproto/802_11/wlan/ieee80211_adhoc.c
+++ b/sys/netproto/802_11/wlan/ieee80211_adhoc.c
@@ -409,6 +409,11 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, ...)
 		if (IEEE80211_HAS_SEQ(type, subtype) &&
 		    IEEE80211_ADDR_EQ(wh->i_addr2, ni->ni_macaddr)) {
+			/* DF-3416: pre-dispatch seq/QoS reads need the full
+			 * header present (IBSS mirror of DF-3325) */
+			if (m->m_pkthdr.len <
+			    (IEEE80211_QOS_HAS_SEQ(wh) ?
+			     sizeof(struct ieee80211_qosframe) :
+			     sizeof(struct ieee80211_frame)))
+				goto out;
 			uint8_t tid = ieee80211_gettid(wh);