summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2026-07-15 22:04:21 +0300
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>2026-07-16 21:10:48 +0300
commit405ff50b72db1dfb86d7502c3c84208779809ab2 (patch)
tree6b83c69e43514d6e59ee2bda2257df4286aadc98
parent71e67b4b59337b2f9f4fef976a27de2dad7aabf2 (diff)
wifi: iwlwifi: mld: fix validation fallback in iwl_mld_notif_is_valid
When a firmware notification version is not in the handler's size table, iwl_mld_notif_is_valid() falls back to comparing against the last known structure size but the comparison is wrong: 'return size < last_known_size' returns true (accept) for undersized payloads and false (reject) for payloads that are large enough. Instead of trying to accept notifications that are large enough, just refuse the notification. We shouldn't ever get a notification that is longer than what we expect. Assisted-by: GitHubCopilot:gpt-5.3-codex Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260715220243.e0b91efe689d.I7d7604be6819da263e9091370892e6b6f4c57913@changeid
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mld/notif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mld/notif.c b/drivers/net/wireless/intel/iwlwifi/mld/notif.c
index 7574689e4088..b3a899828db9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/notif.c
+++ b/drivers/net/wireless/intel/iwlwifi/mld/notif.c
@@ -517,7 +517,7 @@ iwl_mld_notif_is_valid(struct iwl_mld *mld, struct iwl_rx_packet *pkt,
handler->cmd_id, notif_ver,
handler->sizes[handler->n_sizes - 1].ver);
- return size < handler->sizes[handler->n_sizes - 1].size;
+ return false;
}
struct iwl_async_handler_entry {