]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/sctp: fix a null dereference in sctp_disposition sctp_sf_do_5_1D_ce()
authorAlexandr Sapozhnikov <alsp705@gmail.com>
Thu, 2 Oct 2025 09:14:47 +0000 (12:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 14:23:08 +0000 (16:23 +0200)
commit025419f4e216a3ae0d0cec622262e98e8078c447
tree2911abf7bb51b5cb5cf5fd9581bbb46ffabbe82e
parent8ae6247dc66d7a49475ac55006b500134e8822d9
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: 30f6ebf65bc4 ("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>
net/sctp/sm_statefuns.c