Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Dmitry Kandybka and committed by
Jakub Kicinski
b169e76e a58f00ed

+2 -2
+2 -2
net/mptcp/protocol.c
··· 2722 2722 if (!fail_tout && !inet_csk(sk)->icsk_mtup.probe_timestamp) 2723 2723 return; 2724 2724 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); 2727 2727 2728 2728 /* the close timeout takes precedence on the fail one, and here at least one of 2729 2729 * them is active