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: <20260112130907.GA13088@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
Date: Mon, 12 Jan 2026 05:09:07 -0800
From: Dipayaan Roy <dipayanroy@...ux.microsoft.com>
To: Aditya Garg <gargaditya@...ux.microsoft.com>
Cc: kys@...rosoft.com, haiyangz@...rosoft.com, wei.liu@...nel.org,
	decui@...rosoft.com, longli@...rosoft.com, andrew+netdev@...n.ch,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, stephen@...workplumber.org,
	linux-hyperv@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, ssengar@...ux.microsoft.com,
	shradhagupta@...ux.microsoft.com, ernis@...ux.microsoft.com,
	gargaditya@...rosoft.com
Subject: Re: [PATCH net-next] net: hv_netvsc: reject RSS hash key programming
 without RX indirection table

On Mon, Jan 12, 2026 at 02:01:33AM -0800, Aditya Garg wrote:
> RSS configuration requires a valid RX indirection table. When the device
> reports a single receive queue, rndis_filter_device_add() does not
> allocate an indirection table, accepting RSS hash key updates in this
> state leads to a hang.
> 
> Fix this by gating netvsc_set_rxfh() on ndc->rx_table_sz and return
> -EOPNOTSUPP when the table is absent. This aligns set_rxfh with the device
> capabilities and prevents incorrect behavior.
> 
> Fixes: 962f3fee83a4 ("netvsc: add ethtool ops to get/set RSS key")
> Signed-off-by: Aditya Garg <gargaditya@...ux.microsoft.com>
> Reviewed-by: Dipayaan Roy <dipayanroy@...ux.microsoft.com>
> ---
>  drivers/net/hyperv/netvsc_drv.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
> index 3d47d749ef9f..cbd52cb79268 100644
> --- a/drivers/net/hyperv/netvsc_drv.c
> +++ b/drivers/net/hyperv/netvsc_drv.c
> @@ -1750,6 +1750,9 @@ static int netvsc_set_rxfh(struct net_device *dev,
>  	    rxfh->hfunc != ETH_RSS_HASH_TOP)
>  		return -EOPNOTSUPP;
>  
> +	if (!ndc->rx_table_sz)
> +		return -EOPNOTSUPP;
> +
>  	rndis_dev = ndev->extension;
>  	if (rxfh->indir) {
>  		for (i = 0; i < ndc->rx_table_sz; i++)
> -- 
> 2.43.0
>

LGTM.

Reviewed-by: Dipayaan Roy <dipayanroy@...ux.microsoft.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ