linux-stable/net/tipc
Tung Nguyen 2fe97a578d tipc: fix potential memory leak in __tipc_sendmsg()
When initiating a connection message to a server side, the connection
message is cloned and added to the socket write queue. However, if the
cloning is failed, only the socket write queue is purged. It causes
memory leak because the original connection message is not freed.

This commit fixes it by purging the list of connection message when
it cannot be cloned.

Fixes: 6787927475 ("tipc: buffer overflow handling in listener socket")
Reported-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-11-28 23:09:14 -08:00
..
addr.c tipc: initialise addr_trail_end when setting node addresses 2019-08-11 21:40:04 -07:00
addr.h tipc: add 128-bit node identifier 2018-03-23 13:12:18 -04:00
bcast.c tipc: update replicast capability for broadcast send link 2019-11-22 09:29:50 -08:00
bcast.h tipc: update replicast capability for broadcast send link 2019-11-22 09:29:50 -08:00
bearer.c tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
bearer.h tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
core.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
core.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
crypto.c tipc: fix update of the uninitialized variable err 2019-11-11 22:04:03 -08:00
crypto.h tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
diag.c tipc: switch to rhashtable iterator 2018-08-29 18:04:54 -07:00
discover.c tipc: improve throughput between nodes in netns 2019-10-29 17:55:38 -07:00
discover.h
eth_media.c
group.c tipc: clean up skb list lock handling on send path 2019-08-18 14:01:07 -07:00
group.h tipc: extend sock diag for group communication 2018-06-30 21:05:42 +09:00
ib_media.c
Kconfig tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
link.c tipc: update replicast capability for broadcast send link 2019-11-22 09:29:50 -08:00
link.h tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
Makefile tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
monitor.c tipc: update mon's self addr when node addr generated 2019-11-12 19:45:45 -08:00
monitor.h tipc: update mon's self addr when node addr generated 2019-11-12 19:45:45 -08:00
msg.c tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
msg.h tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
name_distr.c tipc: improve throughput between nodes in netns 2019-10-29 17:55:38 -07:00
name_distr.h tipc: permit overlapping service ranges in name table 2018-03-31 22:19:52 -04:00
name_table.c tipc: support in-order name publication events 2019-11-22 09:29:50 -08:00
name_table.h tipc: support in-order name publication events 2019-11-22 09:29:50 -08:00
net.c tipc: update mon's self addr when node addr generated 2019-11-12 19:45:45 -08:00
net.h tipc: fix lockdep warning when reinitilaizing sockets 2018-11-17 22:01:31 -08:00
netlink.c tipc: add support for AEAD key setting via netlink 2019-11-08 14:01:59 -08:00
netlink.h net: tipc: allocate attrs locally instead of using genl_family_attrbuf in compat_dumpit() 2019-10-06 15:44:47 +02:00
netlink_compat.c tipc: fix link name length check 2019-11-26 10:03:12 -08:00
node.c tipc: update replicast capability for broadcast send link 2019-11-22 09:29:50 -08:00
node.h tipc: add support for AEAD key setting via netlink 2019-11-08 14:01:59 -08:00
socket.c tipc: fix potential memory leak in __tipc_sendmsg() 2019-11-28 23:09:14 -08:00
socket.h tipc: add trace_events for tipc socket 2018-12-19 11:49:24 -08:00
subscr.c tipc: fix unbalanced reference counter 2018-04-12 21:46:10 -04:00
subscr.h tipc: fix modprobe tipc failed after switch order of device registration 2019-05-20 10:45:43 -07:00
sysctl.c tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
topsrv.c tipc: add loopback device tracking 2019-08-08 22:11:39 -07:00
topsrv.h
trace.c tipc: remove unneeded semicolon in trace.c 2019-01-17 22:04:43 -08:00
trace.h tipc: add trace_events for tipc bearer 2018-12-19 11:49:25 -08:00
udp_media.c tipc: introduce TIPC encryption & authentication 2019-11-08 14:01:59 -08:00
udp_media.h tipc: implement configuration of UDP media MTU 2018-04-20 11:04:05 -04:00