From: Ilan Peer Date: Sun, 11 Sep 2022 13:55:12 +0000 (+0300) Subject: wifi: cfg80211/mac80211: Fix ML element common size validation X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=10277ebb08477c515928c7c4012cdadfb240432f;hp=97d485480b9ba53579ab51790260c13dad5d411c;p=carl9170fw.git wifi: cfg80211/mac80211: Fix ML element common size validation The Multi-Link element can be fragmented, thus its size can exceed 254. Thus, modify ieee80211_mle_size_ok() to use 'size_t len' instead of 'u8 len'. Signed-off-by: Ilan Peer Signed-off-by: Johannes Berg Signed-off-by: Christian Lamparter --- diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 6ad5826..d3fa319 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -4529,7 +4529,7 @@ static inline u8 ieee80211_mle_common_size(const u8 *data) * @data: pointer to the element data * @len: length of the containing element */ -static inline bool ieee80211_mle_size_ok(const u8 *data, u8 len) +static inline bool ieee80211_mle_size_ok(const u8 *data, size_t len) { const struct ieee80211_multi_link_elem *mle = (const void *)data; u8 fixed = sizeof(*mle);