wifi: iwlwifi: mvm: copy the correct TK length for ranging
authorAvraham Stern <avraham.stern@intel.com>
Wed, 15 Jul 2026 18:57:13 +0000 (21:57 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Thu, 16 Jul 2026 18:12:20 +0000 (21:12 +0300)
commit8cb6c719fa3c0812bc0d151a7074f328a61a3062
treeb7d55008978291418ded94f5e94416f23b57f7fe
parent0e4c0d83267261cf67ec9690856edf4a56bb7dfc
wifi: iwlwifi: mvm: copy the correct TK length for ranging

When setting the TK for ranging with an associated peer, 32 bytes of
TK are copied from the vif key without verifying the actual key length
which may be only 16 bytes if CCMP-128 is used. Fix it by setting the
copy length according to the key cipher.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260715215523.e339570086bd.Iafff5aaf0e25f7d29e06f0ef456107c4062bbc7d@changeid
drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c