Skip to content

Commit b91477b

Browse files
committed
Merge: net/sctp: Prevent autoclose integer overflow in sctp_association_init()
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/274 JIRA: https://issues.redhat.com/browse/RHEL-75624 CVE: CVE-2024-57938 Tested: compile only Signed-off-by: Xin Long <lxin@redhat.com> Approved-by: Marcelo Ricardo Leitner <mleitner@redhat.com> Approved-by: Davide Caratti <dcaratti@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Jan Stancek <jstancek@redhat.com>
2 parents 30301ea + 462c8c6 commit b91477b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/sctp/associola.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ static struct sctp_association *sctp_association_init(
137137
= 5 * asoc->rto_max;
138138

139139
asoc->timeouts[SCTP_EVENT_TIMEOUT_SACK] = asoc->sackdelay;
140-
asoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE] = sp->autoclose * HZ;
140+
asoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE] =
141+
(unsigned long)sp->autoclose * HZ;
141142

142143
/* Initializes the timers */
143144
for (i = SCTP_EVENT_TIMEOUT_NONE; i < SCTP_NUM_TIMEOUT_TYPES; ++i)

0 commit comments

Comments
 (0)