diff options
| author | Dmitry Kandybka <[email protected]> | 2024-11-07 10:36:57 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-11-13 02:11:23 +0000 |
| commit | b169e76ebad22cbd055101ee5aa1a7bed0e66606 (patch) | |
| tree | cee6576cfb052d5fca2b12e04141329e11b91213 /net/mptcp/protocol.c | |
| parent | net: sched: cls_api: improve the error message for ID allocation failure (diff) | |
| download | kernel-b169e76ebad22cbd055101ee5aa1a7bed0e66606.tar.gz kernel-b169e76ebad22cbd055101ee5aa1a7bed0e66606.zip | |
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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/mptcp/protocol.c')
| -rw-r--r-- | net/mptcp/protocol.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index b0e9a745ea62..a6f2a25edb11 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -2722,8 +2722,8 @@ void mptcp_reset_tout_timer(struct mptcp_sock *msk, unsigned long fail_tout) if (!fail_tout && !inet_csk(sk)->icsk_mtup.probe_timestamp) return; - close_timeout = inet_csk(sk)->icsk_mtup.probe_timestamp - tcp_jiffies32 + jiffies + - mptcp_close_timeout(sk); + close_timeout = (unsigned long)inet_csk(sk)->icsk_mtup.probe_timestamp - + tcp_jiffies32 + jiffies + mptcp_close_timeout(sk); /* the close timeout takes precedence on the fail one, and here at least one of * them is active |
