Skip to content
Commit ee598530 authored by Xin Long's avatar Xin Long Committed by Greg Kroah-Hartman
Browse files

sctp: change to hold sk after auth shkey is created successfully

[ Upstream commit 25bff6d5 ]

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

 ("[SCTP]: Implement SCTP-AUTH initializations.")
Reported-by: default avatar <syzbot+afabda3890cc2f765041@syzkaller.appspotmail.com>
Reported-by: default avatar <syzbot+276ca1c77a19977c0130@syzkaller.appspotmail.com>
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Acked-by: default avatarNeil Horman <nhorman@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2365b9b2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment