]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: nl80211/cfg80211: add forgotten nla_policy for BSS color attribute
authorLin Ma <linma@zju.edu.cn>
Wed, 9 Aug 2023 03:31:51 +0000 (11:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:22:34 +0000 (12:22 +0200)
commit71ce8be48bf02f7d0593f6858ee1dacff0745002
tree4e7fab842ed5dc709700acd8ff82ccd7c0bec02c
parent11f93fff6e8ad6383127dbc207b97331a65d3fc8
wifi: nl80211/cfg80211: add forgotten nla_policy for BSS color attribute

[ Upstream commit 218d690c49b7e9c94ad0d317adbdd4af846ea0dc ]

The previous commit dd3e4fc75b4a ("nl80211/cfg80211: add BSS color to
NDP ranging parameters") adds a parameter for NDP ranging by introducing
a new attribute type named NL80211_PMSR_FTM_REQ_ATTR_BSS_COLOR.

However, the author forgot to also describe the nla_policy at
nl80211_pmsr_ftm_req_attr_policy (net/wireless/nl80211.c). Just
complement it to avoid malformed attribute that causes out-of-attribute
access.

Fixes: dd3e4fc75b4a ("nl80211/cfg80211: add BSS color to NDP ranging parameters")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20230809033151.768910-1-linma@zju.edu.cn
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/nl80211.c