wifi: ieee80211: check for NULL in ieee80211_mle_size_ok()
BugLink: https://bugs.launchpad.net/bugs/2076435 [ Upstream commit b7793a1a2f370c28b17d9554b58e9dc51afcfcbd ] For simplicity, we may want to pass a NULL element, and while we should then pass also a zero length, just be a bit more careful here. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://msgid.link/20240318184907.4d983653cb8d.Ic3ea99b60c61ac2f7d38cb9fd202a03c97a05601@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
committed by
Stefan Bader
parent
5cd6640238
commit
797e5bd6a7
@@ -5009,7 +5009,7 @@ static inline bool ieee80211_mle_size_ok(const u8 *data, size_t len)
|
||||
bool check_common_len = false;
|
||||
u16 control;
|
||||
|
||||
if (len < fixed)
|
||||
if (!data || len < fixed)
|
||||
return false;
|
||||
|
||||
control = le16_to_cpu(mle->control);
|
||||
|
||||
Reference in New Issue
Block a user