lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87jzjnnsr3.fsf@kernel.org>
Date: Tue, 21 May 2024 17:29:04 +0300
From: Kalle Valo <kvalo@...nel.org>
To: Lin Ma <linma@....edu.cn>
Cc: johannes@...solutions.net,  davem@...emloft.net,  edumazet@...gle.com,
  kuba@...nel.org,  pabeni@...hat.com,  linux-wireless@...r.kernel.org,
  netdev@...r.kernel.org,  linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 net] wifi: cfg80211: pmsr: use correct nla_get_uX
 functions

Lin Ma <linma@....edu.cn> writes:

> The commit 9bb7e0f24e7e ("cfg80211: add peer measurement with FTM
> initiator API") defines four attributes NL80211_PMSR_FTM_REQ_ATTR_
> {NUM_BURSTS_EXP}/{BURST_PERIOD}/{BURST_DURATION}/{FTMS_PER_BURST} in
> following ways.
>
> static const struct nla_policy
> nl80211_pmsr_ftm_req_attr_policy[NL80211_PMSR_FTM_REQ_ATTR_MAX + 1] = {
>     ...
>     [NL80211_PMSR_FTM_REQ_ATTR_NUM_BURSTS_EXP] =
>         NLA_POLICY_MAX(NLA_U8, 15),
>     [NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD] = { .type = NLA_U16 },
>     [NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION] =
>         NLA_POLICY_MAX(NLA_U8, 15),
>     [NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST] =
>         NLA_POLICY_MAX(NLA_U8, 31),
>     ...
> };
>
> That is, those attributes are expected to be NLA_U8 and NLA_U16 types.
> However, the consumers of these attributes in `pmsr_parse_ftm` blindly
> all use `nla_get_u32`, which is incorrect and causes functionality issues
> on little-endian platforms. Hence, fix them with the correct `nla_get_u8`
> and `nla_get_u16` functions.
>
> Fixes: 9bb7e0f24e7e ("cfg80211: add peer measurement with FTM initiator API")
> Signed-off-by: Lin Ma <linma@....edu.cn>
> ---
> V1->V2: add wifi prefix in title,
>         mention the policy that defines those attributes as suggested by johannes
>
>  net/wireless/pmsr.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

wireless patches go to wireless or wireless-next trees, not net tree.
But no need to resend because of this.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ