]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: iwlwifi: mvm: don't set replay counters to 0xff
authorJohannes Berg <johannes.berg@intel.com>
Tue, 6 Feb 2024 16:02:09 +0000 (18:02 +0200)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:28 +0000 (18:19 -0400)
commit85074e3394a854dfc544f8058faf75ce6db14e0a
treec82577d6cc2fec43c0e924cfcb32d4e54d66e4d3
parentb4f1b0b3b91762edd19bf9d3b2e4c3a0740501f8
wifi: iwlwifi: mvm: don't set replay counters to 0xff

[ Upstream commit d5bd4041cd70faf26fc9a54bd6f172537bbe77f3 ]

The firmware (later) actually uses the values even for keys
that are invalid as far as the host is concerned, later in
rekeying, and then only sets the low 48 bits since the PNs
are only 48 bits over the air. It does, however, compare the
full 64 bits later, obviously causing problems.

Remove the memset and use kzalloc instead to avoid any old
heap data leaking to the firmware. We already init all the
other fields in the struct anyway. This leaves the data set
to zero for any unused fields, so the firmware can look at
them safely even if they're not used right now.

Fixes: 79e561f0f05a ("iwlwifi: mvm: d3: implement RSC command version 5")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240206175739.462101146fef.I10f3855b99417af4247cff04af78dcbc6cb75c9c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mvm/d3.c