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] [thread-next>] [day] [month] [year] [list]
Date: Thu, 8 Jun 2023 15:42:59 -0600
From: David Ahern <dsahern@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
	pabeni@...hat.com
Subject: Re: [PATCH net] net: ethtool: correct MAX attribute value for stats

On Thu, Jun 08, 2023 at 09:23:44AM -0700, Jakub Kicinski wrote:
> When compiling YNL generated code compiler complains about
> array-initializer-out-of-bounds. Turns out the MAX value
> for STATS_GRP uses the value for STATS.
> 
> This may lead to random corruptions in user space (kernel
> itself doesn't use this value as it never parses stats).
> 
> Fixes: f09ea6fb1272 ("ethtool: add a new command for reading standard stats")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
>  include/uapi/linux/ethtool_netlink.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/uapi/linux/ethtool_netlink.h b/include/uapi/linux/ethtool_netlink.h
> index 1ebf8d455f07..73e2c10dc2cc 100644
> --- a/include/uapi/linux/ethtool_netlink.h
> +++ b/include/uapi/linux/ethtool_netlink.h
> @@ -783,7 +783,7 @@ enum {
>  
>  	/* add new constants above here */
>  	__ETHTOOL_A_STATS_GRP_CNT,
> -	ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_CNT - 1)
> +	ETHTOOL_A_STATS_GRP_MAX = (__ETHTOOL_A_STATS_GRP_CNT - 1)
>  };
>  
>  enum {
> -- 
> 2.40.1
> 

Reviewed-by: David Ahern <dsahern@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ