bisecting fixing commit since 4520f06b03ae667e442da1ab9351fd28cd7ac598 building syzkaller on a8c6a3f8da30ccf825c6001c81a8adff21829c30 testing commit 4520f06b03ae667e442da1ab9351fd28cd7ac598 with gcc (GCC) 8.1.0 kernel signature: d456c6a546ddde759bf4ef38add77c850290475f50bd8d66bac41cc030b55e37 all runs: crashed: KASAN: global-out-of-bounds Read in get_unique_tuple testing current HEAD ab9dfda232481dcfaf549ce774004d116fc80c13 testing commit ab9dfda232481dcfaf549ce774004d116fc80c13 with gcc (GCC) 8.1.0 kernel signature: 1d1c8383c001cb36ef37b651913d5277421a986d441332f62e7890dc046f35fe all runs: crashed: KASAN: global-out-of-bounds Read in get_unique_tuple revisions tested: 2, total time: 26m3.519327965s (build: 18m57.037168801s, test: 6m2.3723191s) the crash still happens on HEAD commit msg: Linux 4.14.180 crash: KASAN: global-out-of-bounds Read in get_unique_tuple batman_adv: batadv0: Interface activated: batadv_slave_0 8021q: adding VLAN 0 to HW filter on device batadv0 IPv6: ADDRCONF(NETDEV_UP): macvlan1: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): macvlan0: link becomes ready ================================================================== BUG: KASAN: global-out-of-bounds in __read_once_size include/linux/compiler.h:183 [inline] BUG: KASAN: global-out-of-bounds in __nf_nat_l4proto_find net/netfilter/nf_nat_core.c:54 [inline] BUG: KASAN: global-out-of-bounds in get_unique_tuple+0x19cd/0x1f70 net/netfilter/nf_nat_core.c:313 IPv6: ADDRCONF(NETDEV_CHANGE): macvlan1: link becomes ready Read of size 8 at addr ffffffff875b8d80 by task syz-executor.2/7750 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_0: link becomes ready CPU: 1 PID: 7750 Comm: syz-executor.2 Not tainted 4.14.180-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x135/0x1c9 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 __read_once_size include/linux/compiler.h:183 [inline] __nf_nat_l4proto_find net/netfilter/nf_nat_core.c:54 [inline] get_unique_tuple+0x19cd/0x1f70 net/netfilter/nf_nat_core.c:313 IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready nf_nat_setup_info+0x180/0x720 net/netfilter/nf_nat_core.c:407 __nf_nat_alloc_null_binding+0xfd/0x180 net/netfilter/nf_nat_core.c:466 nfnetlink_parse_nat_setup+0x2b6/0x320 net/netfilter/nf_nat_core.c:782 ctnetlink_parse_nat_setup+0x61/0x3d0 net/netfilter/nf_conntrack_netlink.c:1421 ctnetlink_setup_nat net/netfilter/nf_conntrack_netlink.c:1491 [inline] ctnetlink_create_conntrack+0x366/0xf10 net/netfilter/nf_conntrack_netlink.c:1840 ctnetlink_new_conntrack+0x432/0xd30 net/netfilter/nf_conntrack_netlink.c:1964 nfnetlink_rcv_msg+0x89a/0xa70 net/netfilter/nfnetlink.c:214 netlink_rcv_skb+0x133/0x370 net/netlink/af_netlink.c:2433 nfnetlink_rcv+0x176/0x1570 net/netfilter/nfnetlink.c:515 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x40b/0x600 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x730/0xbd0 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 ___sys_sendmsg+0x625/0x920 net/socket.c:2062 __sys_sendmsg+0xc1/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0xd/0x20 net/socket.c:2103 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45c889 RSP: 002b:00007f75118dec78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f75118df6d4 RCX: 000000000045c889 RDX: 0000000000000000 RSI: 0000000020000640 RDI: 0000000000000003 RBP: 000000000076bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000095c R14: 00000000004cc13b R15: 000000000076bf0c The buggy address belongs to the variable: nft_filter_chain_netdev+0x440/0x4c0 Memory state around the buggy address: ffffffff875b8c80: 00 00 06 fa fa fa fa fa 06 fa fa fa fa fa fa fa ffffffff875b8d00: 00 01 fa fa fa fa fa fa 07 fa fa fa fa fa fa fa >ffffffff875b8d80: 06 fa fa fa fa fa fa fa 00 03 fa fa fa fa fa fa ^ ffffffff875b8e00: 00 00 00 00 00 00 fa fa fa fa fa fa 00 00 00 00 ffffffff875b8e80: 00 fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 ================================================================== device veth1_vlan entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): macvlan0: link is not ready