ZhangXiaoxu
19fad20d15
ipv4: set the tcp_min_rtt_wlen range from 0 to one day
There is a UBSAN report as below:
UBSAN: Undefined behaviour in net/ipv4/tcp_input.c:2877:56
signed integer overflow:
2147483647 * 1000 cannot be represented in type 'int'
CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.1.0-rc4-00058-g582549e #1
Call Trace:
<IRQ>
dump_stack+0x8c/0xba
ubsan_epilogue+0x11/0x60
handle_overflow+0x12d/0x170
? ttwu_do_wakeup+0x21/0x320
__ubsan_handle_mul_overflow+0x12/0x20
tcp_ack_update_rtt+0x76c/0x780
tcp_clean_rtx_queue+0x499/0x14d0
tcp_ack+0x69e/0x1240
? __wake_up_sync_key+0x2c/0x50
? update_group_capacity+0x50/0x680
tcp_rcv_established+0x4e2/0xe10
tcp_v4_do_rcv+0x22b/0x420
tcp_v4_rcv+0xfe8/0x1190
ip_protocol_deliver_rcu+0x36/0x180
ip_local_deliver+0x15b/0x1a0
ip_rcv+0xac/0xd0
__netif_receive_skb_one_core+0x7f/0xb0
__netif_receive_skb+0x33/0xc0
netif_receive_skb_internal+0x84/0x1c0
napi_gro_receive+0x2a0/0x300
receive_buf+0x3d4/0x2350
? detach_buf_split+0x159/0x390
virtnet_poll+0x198/0x840
? reweight_entity+0x243/0x4b0
net_rx_action+0x25c/0x770
__do_softirq+0x19b/0x66d
irq_exit+0x1eb/0x230
do_IRQ+0x7a/0x150
common_interrupt+0xf/0xf
</IRQ>
It can be reproduced by:
echo 2147483647 > /proc/sys/net/ipv4/tcp_min_rtt_wlen
Fixes: f672258391 ("tcp: track min RTT using windowed min-filter")
Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-17 13:57:11 -07:00
..
2019-03-16 13:05:32 -07:00
2019-04-05 16:02:31 -10:00
2019-03-07 11:28:33 +01:00
2019-03-16 12:36:39 -07:00
2019-02-12 15:20:09 +00:00
2019-03-10 10:17:23 -07:00
2019-02-15 08:40:12 -07:00
2019-01-08 17:15:10 -08:00
2019-03-26 13:13:42 -07:00
2019-03-09 09:56:17 -08:00
2019-03-12 10:39:53 -07:00
2018-12-23 11:52:45 +08:00
2019-01-14 17:25:41 -07:00
2019-03-05 14:53:52 -05:00
2019-04-07 13:46:17 -10:00
2019-02-17 15:38:47 -07:00
2019-03-14 09:11:54 -07:00
2019-03-08 10:27:21 -08:00
2019-01-07 15:36:11 -07:00
2019-01-16 17:42:35 +01:00
2019-01-07 22:22:16 +08:00
2019-03-28 08:54:20 -07:00
2019-02-11 10:35:35 +01:00
2018-12-18 14:55:22 +01:00
2019-03-09 09:56:17 -08:00
2019-03-20 17:42:23 +01:00
2019-02-07 12:56:23 -07:00
2019-02-01 16:05:03 -07:00
2019-01-22 13:37:25 +01:00
2018-12-11 16:28:41 -08:00
2019-03-17 12:56:32 +09:00
2019-01-15 11:05:28 +01:00
2019-02-11 08:27:47 -07:00
2019-01-16 22:09:33 +01:00
2019-03-04 12:55:18 -07:00
2019-03-01 09:54:06 -05:00
2019-01-14 08:37:17 -07:00
2019-04-17 13:57:11 -07:00
2018-12-21 12:44:41 -08:00
2018-12-06 12:29:47 +00:00
2019-01-27 12:29:37 +01:00
2018-12-21 11:32:49 +11:00
2019-03-09 09:56:17 -08:00
2019-03-09 09:56:17 -08:00
2019-01-27 12:29:37 +01:00
2019-02-27 09:00:02 -05:00
2019-02-22 08:54:09 -07:00
2018-12-18 16:13:04 +01:00
2019-02-28 13:30:55 +01:00
2019-01-23 10:59:56 +00:00
2019-03-09 09:56:17 -08:00
2019-02-04 21:23:59 -05:00
2019-02-22 08:50:17 -07:00
2019-02-21 10:28:55 -05:00
2019-03-09 09:56:17 -08:00
2019-02-22 09:27:55 +01:00
2019-01-29 22:11:49 +01:00
2019-03-28 17:30:11 +01:00
2019-02-01 16:04:01 -07:00
2019-03-02 15:28:20 +01:00
2019-02-02 10:34:52 +01:00
2019-02-03 18:06:19 -08:00
2019-02-20 07:29:47 -07:00
2019-03-10 12:47:57 -07:00
2019-02-11 08:23:07 -07:00
2019-03-07 18:32:02 -08:00
2019-01-14 08:37:17 -07:00
2018-12-06 13:57:03 +01:00
2019-04-05 16:02:30 -10:00
2018-12-13 09:41:32 -06:00
2019-02-06 16:44:16 -07:00