summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-02-09 11:17:11 +0100
committeriwlwifi publisher <>2024-04-17 12:48:44 +0000
commit86b5144ac0c28224c9d7dfef91da8bd732825279 (patch)
treeefa377607a310bcc2527681b933c7a43794eb222
parentf5bdcb5cc3a29df8174ec7323d861d49dde61155 (diff)
downloadbackport-iwlwifi-86b5144ac0c28224c9d7dfef91da8bd732825279.tar.gz
wifi: ieee80211: check for NULL in ieee80211_mle_size_ok()
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. type=feature ticket=none Change-Id: Ic3ea99b60c61ac2f7d38cb9fd202a03c97a05601 Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/93699 automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM> Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com> x-iwlwifi-stack-dev: c18739fe3fd900d6cda20fbffc663461b0893894
-rw-r--r--include/linux/ieee80211.h2
-rw-r--r--versions2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index ee8597ce9b..94cec58fe0 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -5242,7 +5242,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);
diff --git a/versions b/versions
index 09ea36cc11..723f5deddc 100644
--- a/versions
+++ b/versions
@@ -2,4 +2,4 @@ BACKPORTS_VERSION="(see git)"
BACKPORTED_KERNEL_VERSION="(see git)"
BACKPORTED_KERNEL_NAME="iwlwifi"
BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__
-BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11894:8d7b5fae"
+BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11895:c18739fe"