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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 6 Jul 2009 09:12:30 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Mariusz Kozlowski <m.kozlowski@...land.pl>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Cc:	Eugene Kapun <abacabadabacaba@...il.com>, maxk@...lcomm.com,
	linux-net@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: PROBLEM: tun/tap crashes if open() /dev/net/tun and then
	poll() it.

On Mon, Jul 06, 2009 at 12:11:14AM +0200, Mariusz Kozlowski wrote:
>
> 	Can you try this patch?
> 
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 11a0ba4..c599327 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -486,12 +486,14 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait)
>  {
>  	struct tun_file *tfile = file->private_data;
>  	struct tun_struct *tun = __tun_get(tfile);
> -	struct sock *sk = tun->sk;
> +	struct sock *sk;
>  	unsigned int mask = 0;
>  
>  	if (!tun)
>  		return POLLERR;
>  
> +	sk = tun->sk;
> +
>  	DBG(KERN_INFO "%s: tun_chr_poll\n", tun->dev->name);
>  
>  	poll_wait(file, &tun->socket.wait, wait);

Good catch.  Can you please resend with a sign-off?

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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