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  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:	Mon, 7 Jul 2014 11:28:34 +0800
From:	Ying Xue <ying.xue@...driver.com>
To:	Jon Maloy <jon.maloy@...csson.com>, <davem@...emloft.net>
CC:	<netdev@...r.kernel.org>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	<erik.hugne@...csson.com>, <maloy@...jonn.com>,
	<tipc-discussion@...ts.sourceforge.net>
Subject: Re: [PATCH net-next 1/1] tipc: fix a memleak when sending data

On 07/07/2014 08:38 AM, Jon Maloy wrote:
> From: Erik Hugne <erik.hugne@...csson.com>
> 
> This fixes a regression bug caused by:
> 067608e9d019d6477fd45dd948e81af0e5bf599f ("tipc: introduce direct
> iovec to buffer chain fragmentation function")
> 
> If data is sent on a nonblocking socket and the destination link
> is congested, the buffer chain is leaked. We fix this by freeing
> the chain in this case.
> 
> Signed-off-by: Erik Hugne <erik.hugne@...csson.com>
> Signed-off-by: Jon Maloy <jon.maloy@...csson.com>

Acked-by: Ying Xue <ying.xue@...driver.com>

> ---
>  net/tipc/socket.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/net/tipc/socket.c b/net/tipc/socket.c
> index ede78b1..8c5600c 100644
> --- a/net/tipc/socket.c
> +++ b/net/tipc/socket.c
> @@ -784,8 +784,9 @@ new_mtu:
>  			break;
>  
>  		rc = tipc_wait_for_sndmsg(sock, &timeo);
> +		if (rc)
> +			kfree_skb_list(buf);
>  	} while (!rc);
> -
>  exit:
>  	if (iocb)
>  		release_sock(sk);
> @@ -898,6 +899,8 @@ next:
>  				break;
>  		}
>  		rc = tipc_wait_for_sndpkt(sock, &timeo);
> +		if (rc)
> +			kfree_skb_list(buf);
>  	} while (!rc);
>  exit:
>  	if (iocb)
> 

--
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