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 Apr 2013 17:04:42 +0200
From:	Arkadiusz Miskiewicz <a.miskiewicz@...il.com>
To:	Gao feng <gaofeng@...fujitsu.com>
Cc:	netdev@...r.kernel.org, jasowang@...hat.com
Subject: Re: [PATCH] net: tun: release the reference of tun device in tun_recvmsg

On Thursday 25 of April 2013, Gao feng wrote:
> We forget to release the reference of tun device in tun_recvmsg.
> bug introduced in commit 54f968d6efdbf7dec36faa44fc11f01b0e4d1990
> (tuntap: move socket to tun_file)

Hm, still hitting the problem even with the patch - dmesg:

http://pastebin.com/iSm0QJVY


> 
> Signed-off-by: Gao feng <gaofeng@...fujitsu.com>
> ---
>  drivers/net/tun.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 0c9df2f..dcd0c19 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -1471,14 +1471,17 @@ static int tun_recvmsg(struct kiocb *iocb, struct
> socket *sock, if (!tun)
>  		return -EBADFD;
> 
> -	if (flags & ~(MSG_DONTWAIT|MSG_TRUNC))
> -		return -EINVAL;
> +	if (flags & ~(MSG_DONTWAIT|MSG_TRUNC)) {
> +		ret = -EINVAL;
> +		goto out;
> +	}
>  	ret = tun_do_read(tun, tfile, iocb, m->msg_iov, total_len,
>  			  flags & MSG_DONTWAIT);
>  	if (ret > total_len) {
>  		m->msg_flags |= MSG_TRUNC;
>  		ret = flags & MSG_TRUNC ? ret : total_len;
>  	}
> +out:
>  	tun_put(tun);
>  	return ret;
>  }


-- 
Arkadiusz Miƛkiewicz, arekm / maven.pl
--
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