diff options
author | Johannes Berg <johannes.berg@intel.com> | 2025-07-18 20:23:06 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2025-07-21 19:35:45 +0200 |
commit | be06a8c7313943109fa870715356503c4c709cbc (patch) | |
tree | b52173bd190f3702a29ab306e3e33fd630c6effe | |
parent | 460114eae8284155b51f6e72ed26f627ee338a30 (diff) |
wifi: cfg80211: reject HTC bit for management frames
Management frames sent by userspace should never have the
order/HTC bit set, reject that. It could also cause some
confusion with the length of the buffer and the header so
the validation might end up wrong.
Link: https://patch.msgid.link/20250718202307.97a0455f0f35.I1805355c7e331352df16611839bc8198c855a33f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/mlme.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index bb5bc6ff09d4..46394eb2086f 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c @@ -867,7 +867,8 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, mgmt = (const struct ieee80211_mgmt *)params->buf; - if (!ieee80211_is_mgmt(mgmt->frame_control)) + if (!ieee80211_is_mgmt(mgmt->frame_control) || + ieee80211_has_order(mgmt->frame_control)) return -EINVAL; stype = le16_to_cpu(mgmt->frame_control) & IEEE80211_FCTL_STYPE; |