Skip to content

Commit b169e76

Browse files
dmikandkuba-moo
authored andcommitted
mptcp: fix possible integer overflow in mptcp_reset_tout_timer
In 'mptcp_reset_tout_timer', promote 'probe_timestamp' to unsigned long to avoid possible integer overflow. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Kandybka <d.kandybka@gmail.com> Link: https://patch.msgid.link/20241107103657.1560536-1-d.kandybka@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent a58f00e commit b169e76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/mptcp/protocol.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2722,8 +2722,8 @@ void mptcp_reset_tout_timer(struct mptcp_sock *msk, unsigned long fail_tout)
27222722
if (!fail_tout && !inet_csk(sk)->icsk_mtup.probe_timestamp)
27232723
return;
27242724

2725-
close_timeout = inet_csk(sk)->icsk_mtup.probe_timestamp - tcp_jiffies32 + jiffies +
2726-
mptcp_close_timeout(sk);
2725+
close_timeout = (unsigned long)inet_csk(sk)->icsk_mtup.probe_timestamp -
2726+
tcp_jiffies32 + jiffies + mptcp_close_timeout(sk);
27272727

27282728
/* the close timeout takes precedence on the fail one, and here at least one of
27292729
* them is active

0 commit comments

Comments
 (0)