]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/sctp: Prevent autoclose integer overflow in sctp_association_init()
authorNikolay Kuratov <kniv@yandex-team.ru>
Thu, 19 Dec 2024 16:21:14 +0000 (19:21 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2025 12:30:06 +0000 (13:30 +0100)
commit7af63ef5fe4d480064eb22583b24ffc8b408183a
treecba65922643365436878cc823c9768da3e0920df
parenteef34c0151f75b551417acfdfc5ee0e72a82136b
net/sctp: Prevent autoclose integer overflow in sctp_association_init()

commit 4e86729d1ff329815a6e8a920cb554a1d4cb5b8d upstream.

While by default max_autoclose equals to INT_MAX / HZ, one may set
net.sctp.max_autoclose to UINT_MAX. There is code in
sctp_association_init() that can consequently trigger overflow.

Cc: stable@vger.kernel.org
Fixes: 9f70f46bd4c7 ("sctp: properly latch and use autoclose value from sock to association")
Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20241219162114.2863827-1-kniv@yandex-team.ru
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sctp/associola.c