We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abaf94e commit 9a6847bCopy full SHA for 9a6847b
net/wireless/nl80211.c
@@ -229,9 +229,13 @@ static int validate_beacon_head(const struct nlattr *attr,
229
unsigned int len = nla_len(attr);
230
const struct element *elem;
231
const struct ieee80211_mgmt *mgmt = (void *)data;
232
- bool s1g_bcn = ieee80211_is_s1g_beacon(mgmt->frame_control);
233
unsigned int fixedlen, hdrlen;
+ bool s1g_bcn;
234
235
+ if (len < offsetofend(typeof(*mgmt), frame_control))
236
+ goto err;
237
+
238
+ s1g_bcn = ieee80211_is_s1g_beacon(mgmt->frame_control);
239
if (s1g_bcn) {
240
fixedlen = offsetof(struct ieee80211_ext,
241
u.s1g_beacon.variable);
0 commit comments