Miaohe Lin
a843dc4eba
net: sit: fix UBSAN Undefined behaviour in check_6rd
In func check_6rd,tunnel->ip6rd.relay_prefixlen may equal to
32,so UBSAN complain about it.
UBSAN: Undefined behaviour in net/ipv6/sit.c:781:47
shift exponent 32 is too large for 32-bit type 'unsigned int'
CPU: 6 PID: 20036 Comm: syz-executor.0 Not tainted 4.19.27 #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1
04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0xca/0x13e lib/dump_stack.c:113
ubsan_epilogue+0xe/0x81 lib/ubsan.c:159
__ubsan_handle_shift_out_of_bounds+0x293/0x2e8 lib/ubsan.c:425
check_6rd.constprop.9+0x433/0x4e0 net/ipv6/sit.c:781
try_6rd net/ipv6/sit.c:806 [inline]
ipip6_tunnel_xmit net/ipv6/sit.c:866 [inline]
sit_tunnel_xmit+0x141c/0x2720 net/ipv6/sit.c:1033
__netdev_start_xmit include/linux/netdevice.h:4300 [inline]
netdev_start_xmit include/linux/netdevice.h:4309 [inline]
xmit_one net/core/dev.c:3243 [inline]
dev_hard_start_xmit+0x17c/0x780 net/core/dev.c:3259
__dev_queue_xmit+0x1656/0x2500 net/core/dev.c:3829
neigh_output include/net/neighbour.h:501 [inline]
ip6_finish_output2+0xa36/0x2290 net/ipv6/ip6_output.c:120
ip6_finish_output+0x3e7/0xa20 net/ipv6/ip6_output.c:154
NF_HOOK_COND include/linux/netfilter.h:278 [inline]
ip6_output+0x1e2/0x720 net/ipv6/ip6_output.c:171
dst_output include/net/dst.h:444 [inline]
ip6_local_out+0x99/0x170 net/ipv6/output_core.c:176
ip6_send_skb+0x9d/0x2f0 net/ipv6/ip6_output.c:1697
ip6_push_pending_frames+0xc0/0x100 net/ipv6/ip6_output.c:1717
rawv6_push_pending_frames net/ipv6/raw.c:616 [inline]
rawv6_sendmsg+0x2435/0x3530 net/ipv6/raw.c:946
inet_sendmsg+0xf8/0x5c0 net/ipv4/af_inet.c:798
sock_sendmsg_nosec net/socket.c:621 [inline]
sock_sendmsg+0xc8/0x110 net/socket.c:631
___sys_sendmsg+0x6cf/0x890 net/socket.c:2114
__sys_sendmsg+0xf0/0x1b0 net/socket.c:2152
do_syscall_64+0xc8/0x580 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
Signed-off-by: linmiaohe <linmiaohe@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-11 10:32:45 -07:00
..
2019-01-22 09:51:19 +01:00
2018-12-25 17:07:49 +09:00
2019-02-24 17:40:46 -08:00
2019-03-03 13:01:49 -08:00
2019-03-07 10:14:50 -08:00
2019-01-23 11:18:00 -08:00
2019-02-15 12:38:38 -08:00
2019-02-26 10:08:26 +01:00
2019-03-08 21:17:07 +01:00
2019-02-23 13:34:40 -08:00
2019-03-02 14:01:04 -08:00
2019-02-17 11:01:17 -08:00
2019-01-22 11:33:46 +01:00
2019-02-18 18:05:33 +01:00
2019-03-10 11:07:14 -07:00
2019-02-08 15:00:17 -08:00
2019-01-29 21:18:54 -08:00
2018-10-04 09:40:52 -07:00
2019-03-03 20:45:52 -08:00
2019-02-22 12:55:31 -08:00
2019-03-07 11:02:08 -08:00
2019-02-26 08:27:05 -08:00
2019-03-08 16:05:10 -08:00
2019-03-11 10:32:45 -07:00
2018-11-10 16:55:11 -08:00
2019-02-23 13:46:24 -08:00
2019-02-12 10:36:42 +01:00
2019-01-31 08:58:46 -08:00
2018-12-03 14:15:26 -08:00
2018-10-22 19:59:20 -07:00
2019-02-24 12:06:19 -08:00
2018-09-28 12:46:07 +08:00
2019-03-02 12:54:35 -08:00
2018-11-27 16:37:20 -08:00
2019-03-01 14:36:59 +01:00
2019-02-27 21:45:24 -08:00
2019-02-22 13:49:00 +01:00
2019-01-27 10:38:04 -08:00
2019-02-27 12:47:08 -08:00
2019-02-27 10:54:08 +01:00
2019-02-22 12:55:31 -08:00
2019-02-21 16:23:56 -08:00
2019-02-08 15:00:17 -08:00
2018-12-18 13:13:56 +01:00
2019-02-19 13:22:46 -08:00
2019-03-08 18:24:53 -08:00
2019-03-08 15:17:47 -08:00
2019-03-08 11:42:49 -08:00
2019-02-28 12:49:44 -08:00
2018-10-15 12:23:19 -07:00
2019-02-16 17:38:01 -08:00
2019-03-01 21:35:19 -08:00
2019-03-05 12:49:13 -08:00
2019-03-03 22:10:16 -08:00
2019-02-20 20:06:28 -08:00
2019-03-08 15:15:44 -08:00
2019-02-22 13:48:13 +01:00
2019-03-10 11:03:59 -07:00
2019-03-08 21:17:06 +01:00
2019-02-18 10:58:54 +01:00
2019-03-03 20:58:25 -08:00
2019-02-26 08:49:05 -08:00
2019-03-02 12:54:35 -08:00