linux-stable/net/sctp
Xin Long 17bcbe8589 sctp: change to hold sk after auth shkey is created successfully
[ Upstream commit 25bff6d547 ]

Now in sctp_endpoint_init(), it holds the sk then creates auth
shkey. But when the creation fails, it doesn't release the sk,
which causes a sk defcnf leak,

Here to fix it by only holding the sk when auth shkey is created
successfully.

Fixes: a29a5bd4f5 ("[SCTP]: Implement SCTP-AUTH initializations.")
Reported-by: syzbot+afabda3890cc2f765041@syzkaller.appspotmail.com
Reported-by: syzbot+276ca1c77a19977c0130@syzkaller.appspotmail.com
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-10 09:55:40 +02:00
..
associola.c sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer 2018-12-01 09:44:19 +01:00
auth.c
bind_addr.c
chunk.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-10-02 22:20:41 -04:00
debug.c net: sctp: fix array overrun read on sctp_timer_tbl 2017-12-09 22:01:53 +01:00
endpointola.c sctp: change to hold sk after auth shkey is created successfully 2019-07-10 09:55:40 +02:00
input.c sctp: add the missing sock_owned_by_user check in sctp_icmp_redirect 2017-11-18 11:22:21 +01:00
inqueue.c sctp: fix the issue that the cookie-ack with auth can't get processed 2018-05-19 10:26:59 +02:00
ipv6.c sctp: allocate sctp_sockaddr_entry with kzalloc 2019-01-23 08:10:56 +01:00
Kconfig
Makefile
objcnt.c
offload.c sctp: call gso_reset_checksum when computing checksum in sctp_gso_segment 2019-02-27 10:07:01 +01:00
output.c sctp: fix the panic caused by route update 2016-10-26 17:32:19 -04:00
outqueue.c sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune 2018-02-25 11:05:47 +01:00
primitive.c
probe.c
proc.c sctp: hold transport before accessing its asoc in sctp_transport_get_next 2018-09-15 09:42:56 +02:00
protocol.c sctp: initialize _pad of sockaddr_in before copying to user memory 2019-04-17 08:36:45 +02:00
sctp_diag.c sctp: Avoid out-of-bounds reads from address storage 2017-09-20 08:19:54 +02:00
sm_make_chunk.c sctp: verify size of a new chunk in _sctp_make_chunk() 2018-03-11 16:21:34 +01:00
sm_sideeffect.c sctp: make sctp_outq_flush/tail/uncork return void 2016-09-18 22:02:33 -04:00
sm_statefuns.c sctp: delay the authentication for the duplicated cookie-echo chunk 2018-05-19 10:26:59 +02:00
sm_statetable.c
socket.c sctp: not allow to set asoc prsctp_enable by sockopt 2018-11-23 08:20:34 +01:00
ssnmap.c
sysctl.c
transport.c sctp: not allow transport timeout value less than HZ/5 for hb_timer 2018-06-13 16:16:43 +02:00
tsnmap.c
ulpevent.c sctp: remove sctp_chunk_put from fail_mark err path in sctp_ulpevent_make_rcvmsg 2018-05-19 10:26:58 +02:00
ulpqueue.c sctp: fix missing wake ups in some situations 2017-09-20 08:19:56 +02:00