mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
net/sctp: fix a null dereference in sctp_disposition sctp_sf_do_5_1D_ce()
[ Upstream commit 2f3119686ef50319490ccaec81a575973da98815 ]
If new_asoc->peer.adaptation_ind=0 and sctp_ulpevent_make_authkey=0
and sctp_ulpevent_make_authkey() returns 0, then the variable
ai_ev remains zero and the zero will be dereferenced
in the sctp_ulpevent_free() function.
Signed-off-by: Alexandr Sapozhnikov <alsp705@gmail.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Fixes: 30f6ebf65b ("sctp: add SCTP_AUTH_NO_AUTH type for AUTHENTICATION_EVENT")
Link: https://patch.msgid.link/20251002091448.11-1-alsp705@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1822e5287b
commit
1014b83778
1 changed files with 2 additions and 1 deletions
|
|
@ -873,7 +873,8 @@ enum sctp_disposition sctp_sf_do_5_1D_ce(struct net *net,
|
|||
return SCTP_DISPOSITION_CONSUME;
|
||||
|
||||
nomem_authev:
|
||||
sctp_ulpevent_free(ai_ev);
|
||||
if (ai_ev)
|
||||
sctp_ulpevent_free(ai_ev);
|
||||
nomem_aiev:
|
||||
sctp_ulpevent_free(ev);
|
||||
nomem_ev:
|
||||
|
|
|
|||
Loading…
Reference in a new issue