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: <a51a9a11-02b4-4da5-a9cc-1317b6bc7526@embeddedor.com>
Date: Wed, 23 Oct 2024 15:43:15 -0600
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Dmitry Antipov <dmantipov@...dex.ru>, Jeff Johnson <jjohnson@...nel.org>
Cc: Kalle Valo <kvalo@...nel.org>, Kees Cook <kees@...nel.org>,
 linux-hardening@...r.kernel.org, linux-wireless@...r.kernel.org,
 lvc-project@...uxtesting.org
Subject: Re: [PATCH 2/2] wifi: ath12k: annotate channel of struct
 ath12k_wmi_scan_chan_list_arg with __counted_by



On 21/10/24 08:34, Dmitry Antipov wrote:
> According to 'ath12k_reg_update_chan_list()', annotate flexible
> array member 'channel' of 'struct ath12k_wmi_scan_chan_list_arg'
> with '__counted_by()' attribute to improve runtime bounds checking
> when CONFIG_UBSAN_BOUNDS is enabled. Compile tested only.

It seems you didn't[1] actually build-test this changes. :/

-Gustavo

[1] https://lore.kernel.org/linux-hardening/202410231916.Wjn5HeB6-lkp@intel.com/

> 
> Signed-off-by: Dmitry Antipov <dmantipov@...dex.ru>
> ---
>   drivers/net/wireless/ath/ath12k/wmi.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h
> index 6a913f9b8315..9a6e28142754 100644
> --- a/drivers/net/wireless/ath/ath12k/wmi.h
> +++ b/drivers/net/wireless/ath/ath12k/wmi.h
> @@ -3746,7 +3746,7 @@ struct wmi_stop_scan_cmd {
>   struct ath12k_wmi_scan_chan_list_arg {
>   	u32 pdev_id;
>   	u16 nallchans;
> -	struct ath12k_wmi_channel_arg channel[];
> +	struct ath12k_wmi_channel_arg channel[] __counted_by(nallchains);
>   };
>   
>   struct wmi_scan_chan_list_cmd {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ