]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: nl80211: Increase ie_len size to prevent truncated IEs in new peer notifications
authorThiyagarajan Pandiyan <thiyagarajan@aerlync.com>
Fri, 5 Jun 2026 05:43:07 +0000 (11:13 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 5 Jun 2026 08:00:04 +0000 (10:00 +0200)
Currently, ie_len in cfg80211_notify_new_peer_candidate is defined as
1-byte field, capping the maximum IE list size at 255 bytes. When a
large beacon is received, the IE list is truncated, passing incomplete
data to wpa_supplicant. This causes supplicant to fail parsing the IEs.

Increasing the size of ie_len to allow the full length of the IE list to
be forwarded properly.

Signed-off-by: Thiyagarajan Pandiyan <thiyagarajan@aerlync.com>
Link: https://patch.msgid.link/20260605054307.427874-1-thiyagarajan@aerlync.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/nl80211.c

index f91a71c7f4db6d0543257f6c99530c868b9d4578..8188ad200de5393ed324d725016e3fef7160cd26 100644 (file)
@@ -8685,7 +8685,7 @@ void cfg80211_ibss_joined(struct net_device *dev, const u8 *bssid,
  * cfg80211 then sends a notification to userspace.
  */
 void cfg80211_notify_new_peer_candidate(struct net_device *dev,
-               const u8 *macaddr, const u8 *ie, u8 ie_len,
+               const u8 *macaddr, const u8 *ie, size_t ie_len,
                int sig_dbm, gfp_t gfp);
 
 /**
index 19244708f5c3219bbef8c367b2d7c03d94db3590..85057bd4d5657357115b88674946fd0878e0e830 100644 (file)
@@ -21355,7 +21355,7 @@ void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
 }
 
 void cfg80211_notify_new_peer_candidate(struct net_device *dev, const u8 *addr,
-                                       const u8 *ie, u8 ie_len,
+                                       const u8 *ie, size_t ie_len,
                                        int sig_dbm, gfp_t gfp)
 {
        struct wireless_dev *wdev = dev->ieee80211_ptr;