Commit 39ab8fff authored by Jozef Hopko's avatar Jozef Hopko Committed by Kalle Valo

wifi: wilc1000: fix ies_len type in connect path

Commit 205c5030 ("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: 205c5030 ("wifi: wilc1000: fix RCU usage in connect path")
Signed-off-by: default avatarJozef Hopko <jozef.hopko@altana.com>
Signed-off-by: default avatarAlexis Lothoré <alexis.lothore@bootlin.com>
Acked-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240701-wilc_fix_ies_data-v1-1-7486cbacf98a@bootlin.com
parent 816c6bec
......@@ -382,7 +382,8 @@ wilc_parse_join_bss_param(struct cfg80211_bss *bss,
struct ieee80211_p2p_noa_attr noa_attr;
const struct cfg80211_bss_ies *ies;
struct wilc_join_bss_param *param;
u8 rates_len = 0, ies_len;
u8 rates_len = 0;
int ies_len;
int ret;
param = kzalloc(sizeof(*param), GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment