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]
Message-ID: <Z5clJP6mmfrupjos@mev-dev.igk.intel.com>
Date: Mon, 27 Jan 2025 07:18:12 +0100
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: Gal Pressman <gal@...dia.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Simon Horman <horms@...nel.org>,
	Edward Cree <ecree.xilinx@...il.com>, netdev@...r.kernel.org,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Ahmed Zaki <ahmed.zaki@...el.com>, Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH net] ethtool: Fix set RXNFC command with symmetric RSS
 hash

On Sun, Jan 26, 2025 at 09:18:45PM +0200, Gal Pressman wrote:
> The sanity check that both source and destination are set when symmetric
> RSS hash is requested is only relevant for ETHTOOL_SRXFH (rx-flow-hash),
> it should not be performed on any other commands (e.g.
> ETHTOOL_SRXCLSRLINS/ETHTOOL_SRXCLSRLDEL).
> 
> This resolves accessing uninitialized 'info.data' field, and fixes false
> errors in rule insertion:
>   # ethtool --config-ntuple eth2 flow-type ip4 dst-ip 255.255.255.255 action -1 loc 0
>   rmgr: Cannot insert RX class rule: Invalid argument
>   Cannot insert classification rule
> 
> Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash")
> Cc: Ahmed Zaki <ahmed.zaki@...el.com>
> Reviewed-by: Tariq Toukan <tariqt@...dia.com>
> Signed-off-by: Gal Pressman <gal@...dia.com>
> ---
>  net/ethtool/ioctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
> index 7bb94875a7ec..34bee42e1247 100644
> --- a/net/ethtool/ioctl.c
> +++ b/net/ethtool/ioctl.c
> @@ -998,7 +998,7 @@ static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev,
>  	    ethtool_get_flow_spec_ring(info.fs.ring_cookie))
>  		return -EINVAL;
>  
> -	if (ops->get_rxfh) {
> +	if (cmd == ETHTOOL_SRXFH && ops->get_rxfh) {
>  		struct ethtool_rxfh_param rxfh = {};
>  
>  		rc = ops->get_rxfh(dev, &rxfh);
> -- 
> 2.40.1

Thanks for fixing
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ