[PATCH] ath12k: fix memcpy array overflow in ath12k_peer_assoc_h_he

Kalle Valo kvalo at kernel.org
Wed Aug 2 09:56:01 PDT 2023


Arnd Bergmann <arnd at kernel.org> wrote:

> Two memory copies in this function copy from a short array into a longer one,
> using the wrong size, which leads to an out-of-bounds access:
> 
> include/linux/fortify-string.h:592:4: error: call to '__read_overflow2_field' declared with 'warning' attribute: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror,-Wattribute-warning]
>                         __read_overflow2_field(q_size_field, size);
>                         ^
> include/linux/fortify-string.h:592:4: error: call to '__read_overflow2_field' declared with 'warning' attribute: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror,-Wattribute-warning]
> 2 errors generated.
> 
> Fixes: d889913205cf7 ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
> Signed-off-by: Arnd Bergmann <arnd at arndb.de>
> Signed-off-by: Kalle Valo <quic_kvalo at quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

603cf6c2fcdc wifi: ath12k: fix memcpy array overflow in ath12k_peer_assoc_h_he()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20230703123737.3420464-1-arnd@kernel.org/

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




More information about the ath12k mailing list