Search Linux Wireless

Re: [PATCH] wifi: brcmfmac: cyw: Fix __counted_by to be LE variant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/21/2025 8:18 PM, Kees Cook wrote:
In brcmf_cyw_mgmt_tx() the "len" counter of the struct
brcmf_mf_params_le::data flexible array is stored as little-endian via
cpu_to_le16() so the __counted_by_le() variant must be used:

	struct brcmf_mf_params_le *mf_params;
	...
	mf_params_len = offsetof(struct brcmf_mf_params_le, data) +
			(len - DOT11_MGMT_HDR_LEN);
	mf_params = kzalloc(mf_params_len, GFP_KERNEL);
	...
         mf_params->len = cpu_to_le16(len - DOT11_MGMT_HDR_LEN);

Fixes: 66f909308a7c ("wifi: brcmfmac: cyw: support external SAE authentication in station mode")

Thanks for fixing this.

Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>> Signed-off-by: Kees Cook <kees@xxxxxxxxxx>
---
Cc: Johannes Berg <johannes.berg@xxxxxxxxx>
Cc: Chung-Hsien Hsu <chung-hsien.hsu@xxxxxxxxxxxx>
Cc: Chi-hsien Lin <chi-hsien.lin@xxxxxxxxxxxx>
Cc: James Prestwood <prestwoj@xxxxxxxxx>
Cc: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Cc: "Gustavo A. R. Silva" <gustavoars@xxxxxxxxxx>
Cc: Ting-Ying Li <tingying.li@xxxxxxxxxxx>
Cc: <linux-wireless@xxxxxxxxxxxxxxx>
Cc: <brcm80211@xxxxxxxxxxxxxxx>
Cc: <brcm80211-dev-list.pdl@xxxxxxxxxxxx>
Cc: <linux-hardening@xxxxxxxxxxxxxxx>
---
  .../net/wireless/broadcom/brcm80211/brcmfmac/cyw/fwil_types.h   | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux