bisecting fixing commit since 88d6de67e390b6093f2c11189ad022988a9e2961 building syzkaller on c8e81ce4c7e3b59e7c83c6fab56c217916f3b3b6 testing commit 88d6de67e390b6093f2c11189ad022988a9e2961 with gcc (GCC) 8.1.0 kernel signature: 9e146e073223985ec433882cd8a713ffb305817ba04f3a00c97a82049f9681ac all runs: crashed: KASAN: global-out-of-bounds Read in get_unique_tuple testing current HEAD 2d16cf4817bc6944a2adb5bf4db607c8258e87da testing commit 2d16cf4817bc6944a2adb5bf4db607c8258e87da with gcc (GCC) 8.1.0 kernel signature: 1a64f6e76cc90a0e7e40b1e032c8596d6188da2983c072c5054a74b2d112fd6c all runs: crashed: KASAN: global-out-of-bounds Read in get_unique_tuple revisions tested: 2, total time: 24m49.460142654s (build: 17m57.008399808s, test: 6m21.341460207s) the crash still happens on HEAD commit msg: Linux 4.19.125 crash: KASAN: global-out-of-bounds Read in get_unique_tuple IPv6: ADDRCONF(NETDEV_UP): veth1_vlan: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): macvlan1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_macvtap: link becomes ready ================================================================== BUG: KASAN: global-out-of-bounds in __read_once_size include/linux/compiler.h:193 [inline] BUG: KASAN: global-out-of-bounds in __nf_nat_l4proto_find net/netfilter/nf_nat_core.c:73 [inline] BUG: KASAN: global-out-of-bounds in get_unique_tuple+0x19d9/0x1eb0 net/netfilter/nf_nat_core.c:336 IPv6: ADDRCONF(NETDEV_CHANGE): veth0_macvtap: link becomes ready Read of size 8 at addr ffffffff87c4d020 by task syz-executor.2/7771 CPU: 0 PID: 7771 Comm: syz-executor.2 Not tainted 4.19.125-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x177 lib/dump_stack.c:118 print_address_description.cold.8+0x58/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __read_once_size include/linux/compiler.h:193 [inline] __nf_nat_l4proto_find net/netfilter/nf_nat_core.c:73 [inline] get_unique_tuple+0x19d9/0x1eb0 net/netfilter/nf_nat_core.c:336 IPv6: ADDRCONF(NETDEV_CHANGE): veth1_macvtap: link becomes ready nf_nat_setup_info+0x18a/0x730 net/netfilter/nf_nat_core.c:431 IPv6: ADDRCONF(NETDEV_CHANGE): veth0_macvtap: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_macvtap: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth0_macvtap: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_vlan: link becomes ready __nf_nat_alloc_null_binding+0x109/0x1a0 net/netfilter/nf_nat_core.c:490 nfnetlink_parse_nat_setup+0x2d3/0x340 net/netfilter/nf_nat_core.c:882 IPv6: ADDRCONF(NETDEV_CHANGE): veth0_vlan: link becomes ready ctnetlink_parse_nat_setup+0x7c/0x430 net/netfilter/nf_conntrack_netlink.c:1521 device veth0_macvtap entered promiscuous mode ctnetlink_setup_nat net/netfilter/nf_conntrack_netlink.c:1591 [inline] ctnetlink_create_conntrack+0x389/0xfa0 net/netfilter/nf_conntrack_netlink.c:1984 IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth1_macvtap: link is not ready device veth0_macvtap entered promiscuous mode ctnetlink_new_conntrack+0x46c/0xe10 net/netfilter/nf_conntrack_netlink.c:2114 IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready nfnetlink_rcv_msg+0x942/0xc05 net/netfilter/nfnetlink.c:228 device veth1_macvtap entered promiscuous mode netlink_rcv_skb+0x142/0x390 net/netlink/af_netlink.c:2455 IPv6: ADDRCONF(NETDEV_UP): macsec0: link is not ready nfnetlink_rcv+0x163/0x3b0 net/netfilter/nfnetlink.c:560 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x443/0x650 net/netlink/af_netlink.c:1344 IPv6: ADDRCONF(NETDEV_UP): veth0_to_batadv: link is not ready netlink_sendmsg+0x765/0xc40 net/netlink/af_netlink.c:1909 IPv6: ADDRCONF(NETDEV_UP): veth1_to_batadv: link is not ready batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3d) already exists on: batadv_slave_0 sock_sendmsg_nosec net/socket.c:622 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:632 ___sys_sendmsg+0x647/0x950 net/socket.c:2115 batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! IPv6: ADDRCONF(NETDEV_UP): batadv_slave_0: link is not ready __sys_sendmsg+0xd9/0x180 net/socket.c:2153 __do_sys_sendmsg net/socket.c:2162 [inline] __se_sys_sendmsg net/socket.c:2160 [inline] __x64_sys_sendmsg+0x73/0xb0 net/socket.c:2160 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 batman_adv: batadv0: Interface activated: batadv_slave_0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b349 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fdf5ca5dc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fdf5ca5e6d4 RCX: 000000000045b349 RDX: 0000000000000000 RSI: 0000000020000640 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000941 R14: 00000000004ca9f7 R15: 000000000075bf2c The buggy address belongs to the variable: nft_rt_policy+0xa0/0xe0 batman_adv: The newly added mac address (aa:aa:aa:aa:aa:3e) already exists on: batadv_slave_1 Memory state around the buggy address: ffffffff87c4cf00: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa ffffffff87c4cf80: 00 00 00 00 00 00 fa fa fa fa fa fa 00 00 00 03 >ffffffff87c4d000: fa fa fa fa 07 fa fa fa fa fa fa fa 00 00 00 00 ^ ffffffff87c4d080: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa batman_adv: It is strongly recommended to keep mac addresses unique to avoid problems! ffffffff87c4d100: 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa ==================================================================