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-02-11 21:29:02 -08:00
2019-02-24 12:06:19 -08:00
2016-10-17 11:38:01 +02:00
2018-06-04 17:21:28 -04:00
2019-02-25 23:21:42 +01:00
2018-07-18 15:28:27 -07:00
2016-04-28 14:21:13 -04:00
2017-12-15 17:22:46 +01:00
2018-07-16 13:32:12 -07:00
2019-04-04 15:25:23 +02:00
2018-07-18 15:28:27 -07:00
2018-07-27 10:40:16 +02:00
2018-06-15 12:48:59 -03:00
2017-10-12 11:15:48 -06:00
2019-01-07 15:27:51 -07:00
2017-05-16 08:44:13 -03:00
2018-10-15 21:46:06 -07:00
2019-02-07 10:34:29 -08:00
2019-02-11 20:39:56 -08:00
2018-10-04 13:49:43 -07:00
2019-02-08 15:02:50 -08:00
2018-12-03 13:55:43 -08:00
2017-05-18 10:33:51 -06:00
2018-05-28 22:59:54 -04:00
2019-03-02 00:40:04 +01:00
2016-06-07 16:37:14 -07:00
2018-06-04 17:21:28 -04:00
2017-08-22 10:48:52 -07:00
2019-03-01 17:03:00 -08:00
2018-06-04 17:21:28 -04:00
2019-04-04 15:25:23 +02:00
2019-04-17 13:57:11 -07:00
2018-06-04 17:21:28 -04:00
2018-06-04 17:21:28 -04:00
2017-03-16 13:33:39 +01:00
2017-12-05 11:16:19 -05:00
2018-06-04 17:21:28 -04:00
2016-12-10 23:29:11 -05:00
2017-03-13 15:29:22 -07:00
2019-03-18 09:50:21 -07:00
2018-03-22 14:50:44 -04:00
2018-07-16 11:23:54 -07:00
2016-10-24 08:12:35 -02:00
2019-03-18 20:09:58 -07:00
2018-11-21 10:30:30 -08:00
2017-02-02 14:31:58 +01:00
2018-12-21 00:51:25 +01:00
2019-03-19 15:02:52 +01:00
2019-02-11 12:38:51 -08:00
2018-03-16 10:48:52 -04:00
2019-01-26 09:16:55 -08:00
2018-01-24 15:03:36 -05:00
2018-05-24 22:55:07 -04:00
2016-07-15 11:36:58 -07:00
2017-10-11 13:18:51 +02:00
2019-04-12 16:57:23 -07:00
2019-01-20 19:10:49 -07:00
2016-11-09 20:40:06 -05:00
2019-01-07 15:27:51 -07:00
2019-02-24 12:39:45 -08:00
2019-03-17 19:37:08 -07:00
2018-06-24 16:40:20 +09:00
2019-03-01 21:35:19 -08:00
2019-02-03 11:17:31 -08:00
2018-03-23 12:25:54 -04:00
2018-08-16 19:37:07 +02:00
2018-11-07 16:12:38 -08:00
2018-12-19 11:21:38 -08:00
2017-12-22 06:45:48 +01:00
2016-04-28 14:21:13 -04:00
2017-05-16 08:44:15 -03:00