Skip to content

Commit 806b9b1

Browse files
Jozef HopkoSasha Levin
Jozef Hopko
authored and
Sasha Levin
committed
wifi: wilc1000: fix ies_len type in connect path
[ Upstream commit 39ab8ff ] Commit 205c503 ("wifi: wilc1000: fix RCU usage in connect path") made sure that the IEs data was manipulated under the relevant RCU section. Unfortunately, while doing so, the commit brought a faulty implicit cast from int to u8 on the ies_len variable, making the parsing fail to be performed correctly if the IEs block is larger than 255 bytes. This failure can be observed with Access Points appending a lot of IEs TLVs in their beacon frames (reproduced with a Pixel phone acting as an Access Point, which brough 273 bytes of IE data in my testing environment). Fix IEs parsing by removing this undesired implicit cast. Fixes: 205c503 ("wifi: wilc1000: fix RCU usage in connect path") Signed-off-by: Jozef Hopko <[email protected]> Signed-off-by: Alexis Lothoré <[email protected]> Acked-by: Ajay Singh <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent f24803f commit 806b9b1

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/wireless/microchip/wilc1000

1 file changed

+2
-1
lines changed

drivers/net/wireless/microchip/wilc1000/hif.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ void *wilc_parse_join_bss_param(struct cfg80211_bss *bss,
364364
struct ieee80211_p2p_noa_attr noa_attr;
365365
const struct cfg80211_bss_ies *ies;
366366
struct wilc_join_bss_param *param;
367-
u8 rates_len = 0, ies_len;
367+
u8 rates_len = 0;
368+
int ies_len;
368369
int ret;
369370

370371
param = kzalloc(sizeof(*param), GFP_KERNEL);

0 commit comments

Comments
 (0)