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, 14 Nov 2020 13:00:57 +0100
From:   Pablo Neira Ayuso <pablo@...filter.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     netfilter-devel@...r.kernel.org, davem@...emloft.net,
        netdev@...r.kernel.org, razor@...ckwall.org, jeremy@...zel.net
Subject: Re: [PATCH net-next,v3 3/9] net: resolve forwarding path from
 virtual netdevice and HW destination address

On Fri, Nov 13, 2020 at 05:42:46PM -0800, Jakub Kicinski wrote:
> On Wed, 11 Nov 2020 20:37:31 +0100 Pablo Neira Ayuso wrote:
> > +int dev_fill_forward_path(const struct net_device *dev, const u8 *daddr,
> > +			  struct net_device_path_stack *stack)
> > +{
> > +	const struct net_device *last_dev;
> > +	struct net_device_path_ctx ctx;
> > +	struct net_device_path *path;
> > +	int ret = 0;
> > +
> > +	memset(&ctx, 0, sizeof(ctx));
> > +	ctx.dev = dev;
> > +	ctx.daddr = daddr;
> > +
> > +	while (ctx.dev && ctx.dev->netdev_ops->ndo_fill_forward_path) {
> > +		last_dev = ctx.dev;
> > +
> > +		path = &stack->path[stack->num_paths++];
> 
> I don't see you checking that this stack doesn't overflow.
> 
> What am I missing?

Yes, this check in missing indeed.

I'll fix it and will include it in the next patchset version including
Nikolay's request.

Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ