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:	Sat, 17 Dec 2011 09:39:38 +0100
From:	Sebastian Pöhn <sebastian.poehn@...glemail.com>
To:	Ben Hutchings <bhutchings@...arflare.com>,
	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net] gianfar: Reject out-of-range RX NFC locations

On Sat, 2011-12-17 at 01:05 +0000, Ben Hutchings wrote:
> Currently the driver only uses location values to maintain an ordered
> list of filters.  There is nothing to stop the list becoming longer
> than the filer hardware can support - the driver will report an error,
> but will not roll back the change!
Sure that it does not do the rollback?
In case of to much filters it should work this way:
# Convert all in temp table
# Compress temp table
# Write out temp table => not enough space => discard temp table &
remove filter from list 
> 
> Make it reject location values >= MAX_FILER_IDX, consistent with the
> range that gfar_get_cls_all() reports.
> 
> Signed-off-by: Ben Hutchings <bhutchings@...arflare.com>
Reviewed-by: Sebastian Pöhn <sebastian.poehn@...glemail.com>
> ---
> [Re-sent to what I hope is a current address for Sebastian.]
> 
> This has not been tested in any way, as I don't have a suitable compiler
> installed.  Sebastian, please could you review this?
Unfortunately I haven't too ...
> 
> Ben.
> 
>  drivers/net/ethernet/freescale/gianfar_ethtool.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
> index 5890f4b..5a3b2e5 100644
> --- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
> +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
> @@ -1692,8 +1692,9 @@ static int gfar_set_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd)
>  		ret = gfar_set_hash_opts(priv, cmd);
>  		break;
>  	case ETHTOOL_SRXCLSRLINS:
> -		if (cmd->fs.ring_cookie != RX_CLS_FLOW_DISC &&
> -			cmd->fs.ring_cookie >= priv->num_rx_queues) {
> +		if ((cmd->fs.ring_cookie != RX_CLS_FLOW_DISC &&
> +		     cmd->fs.ring_cookie >= priv->num_rx_queues) ||
> +		    cmd->fs.location >= MAX_FILER_IDX) {
>  			ret = -EINVAL;
>  			break;
>  		}
> -- 
> 1.7.4.4
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ