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, 25 Jan 2007 11:43:18 +0000
From:	Steven Whitehouse <steve@...gwyn.com>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	Patrick Caulfield <patrick@...epenguin.com>
Subject: Re: [PATCH] net: decnet handle a failure in neigh_parms_alloc (take 2)

Hi,

On Wed, Jan 24, 2007 at 09:55:45PM -0700, Eric W. Biederman wrote:
> 
> While enhancing the neighbour code to handle multiple network
> namespaces I noticed that decnet is assuming neigh_parms_alloc
> will allways succeed, which is clearly wrong.  So handle the
> failure.
> 
> Signed-off-by: Eric W. Biederman <ebiederm@...ssion.com>
Acked-by: Steven Whitehouse <steve@...gwyn.com>

Also you should cc Patrick as he is now the maintainer,

Steve.


> ---
>  net/decnet/dn_dev.c |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
> index 324eb47..913e25a 100644
> --- a/net/decnet/dn_dev.c
> +++ b/net/decnet/dn_dev.c
> @@ -1140,16 +1140,23 @@ struct dn_dev *dn_dev_create(struct net_device *dev, int *err)
>  	init_timer(&dn_db->timer);
>  
>  	dn_db->uptime = jiffies;
> +
> +	dn_db->neigh_parms = neigh_parms_alloc(dev, &dn_neigh_table);
> +	if (!dn_db->neigh_parms) {
> +		dev->dn_ptr = NULL;
> +		kfree(dn_db);
> +		return NULL;
> +	}
> +
>  	if (dn_db->parms.up) {
>  		if (dn_db->parms.up(dev) < 0) {
> +			neigh_parms_release(&dn_neigh_table, dn_db->neigh_parms);
>  			dev->dn_ptr = NULL;
>  			kfree(dn_db);
>  			return NULL;
>  		}
>  	}
>  
> -	dn_db->neigh_parms = neigh_parms_alloc(dev, &dn_neigh_table);
> -
>  	dn_dev_sysctl_register(dev, &dn_db->parms);
>  
>  	dn_dev_set_timer(dev);
> -- 
> 1.4.4.1.g278f
> 
-
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