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: <48CFFE2C.7050908@openvz.org>
Date:	Tue, 16 Sep 2008 22:42:52 +0400
From:	Pavel Emelyanov <xemul@...nvz.org>
To:	RĂ©mi Denis-Courmont 
	<remi.denis-courmont@...ia.com>
CC:	netdev@...r.kernel.org
Subject: Re: [PATCH 09/14] Phonet: allocate and initialize new sockets

> @@ -71,8 +73,22 @@ static int pn_socket_create(struct net *net, struct socket *sock, int protocol)
>  		goto out;
>  	}
>  
> -	/* TODO: create and init the struct sock */
> -	err = -EPROTONOSUPPORT;
> +	sk = sk_alloc(net, PF_PHONET, GFP_KERNEL, pnp->prot);
> +	if (sk == NULL) {
> +		err = -ENOMEM;
> +		goto out;
> +	}

This turns to be a little bit messy wrt net namespaces.
Look - you allow for sockets to be created (and isolated from each
other) in each namespace, the list of devices is global, whilst
the sysctls are visible in init_net only...

I'd propose to either make this protocol namespaces aware from the
very beginning or to explicitly prohibit any operations with it in
the non-init netns not to forget to fix it in the future (just like
it was done for all the protocols and is still true for most of them).

Thanks,
Pavel
--
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