mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 01:51:18 +00:00
wifi: nl80211: don't give key data to userspace
[ Upstream commit a7e5793035
]
When a key is requested by userspace, there's really no need
to include the key data, the sequence counter is really what
userspace needs in this case. The fact that it's included is
just a historic quirk.
Remove the key data.
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20240627104411.b6a4f097e4ea.I7e6cc976cb9e8a80ef25a3351330f313373b4578@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
7c4fa9ebfc
commit
673e713210
1 changed files with 2 additions and 8 deletions
|
@ -4421,10 +4421,7 @@ static void get_key_callback(void *c, struct key_params *params)
|
|||
struct nlattr *key;
|
||||
struct get_key_cookie *cookie = c;
|
||||
|
||||
if ((params->key &&
|
||||
nla_put(cookie->msg, NL80211_ATTR_KEY_DATA,
|
||||
params->key_len, params->key)) ||
|
||||
(params->seq &&
|
||||
if ((params->seq &&
|
||||
nla_put(cookie->msg, NL80211_ATTR_KEY_SEQ,
|
||||
params->seq_len, params->seq)) ||
|
||||
(params->cipher &&
|
||||
|
@ -4436,10 +4433,7 @@ static void get_key_callback(void *c, struct key_params *params)
|
|||
if (!key)
|
||||
goto nla_put_failure;
|
||||
|
||||
if ((params->key &&
|
||||
nla_put(cookie->msg, NL80211_KEY_DATA,
|
||||
params->key_len, params->key)) ||
|
||||
(params->seq &&
|
||||
if ((params->seq &&
|
||||
nla_put(cookie->msg, NL80211_KEY_SEQ,
|
||||
params->seq_len, params->seq)) ||
|
||||
(params->cipher &&
|
||||
|
|
Loading…
Reference in a new issue