diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-03-18 19:53:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-30 10:49:05 +0300 |
commit | 33182a5d5238ab089d2dfe0717d424608ebb9476 (patch) | |
tree | c804462d91bc3860025f86f01d6a4715f899959c /include | |
parent | 9e010dd91b80c93dbac4f3717db83b95760c1af9 (diff) | |
download | linux-33182a5d5238ab089d2dfe0717d424608ebb9476.tar.xz |
wifi: ieee80211: fix ieee80211_mle_basic_sta_prof_size_ok()
[ Upstream commit c121514df0daa800cc500dc2738e0b8a1c54af98 ]
If there was a possibility of an MLE basic STA profile without
subelements, we might reject it because we account for the one
octet for sta_info_len twice (it's part of itself, and in the
fixed portion). Like in ieee80211_mle_reconf_sta_prof_size_ok,
subtract 1 to adjust that.
When reading the elements we did take this into account, and
since there are always elements, this never really mattered.
Fixes: 7b6f08771bf6 ("wifi: ieee80211: Support validating ML station profile length")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240318184907.00bb0b20ed60.I8c41dd6fc14c4b187ab901dea15ade73c79fb98c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 83c4d060a559..b69771a2e4e7 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -5145,7 +5145,7 @@ static inline bool ieee80211_mle_basic_sta_prof_size_ok(const u8 *data, info_len += 1; return prof->sta_info_len >= info_len && - fixed + prof->sta_info_len <= len; + fixed + prof->sta_info_len - 1 <= len; } /** |