bisecting fixing commit since b850307b279cbd12ab8c654d1a3dfe55319cc475 building syzkaller on 39acb39de241670ec7f96312c37e4e84f97f5f19 testing commit b850307b279cbd12ab8c654d1a3dfe55319cc475 with gcc (GCC) 8.1.0 kernel signature: a0c10fb164efacb52e875b064f01b811ce4e50712f0ada77e8349435ea1be834 all runs: crashed: KASAN: global-out-of-bounds Read in get_unique_tuple testing current HEAD ca87c82811906f4fc5e936705564ba8176ba497f testing commit ca87c82811906f4fc5e936705564ba8176ba497f with gcc (GCC) 8.1.0 kernel signature: 0643866812043567f80ff52dbed18bc75a529d5c9070f01a223a6002c027caea all runs: crashed: KASAN: global-out-of-bounds Read in get_unique_tuple revisions tested: 2, total time: 24m16.848885118s (build: 17m40.365516873s, test: 5m46.022696445s) the crash still happens on HEAD commit msg: Linux 4.14.199 crash: KASAN: global-out-of-bounds Read in get_unique_tuple IPv6: ADDRCONF(NETDEV_CHANGE): macvlan0: 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): batadv_slave_0: 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+0x19d1/0x1f70 net/netfilter/nf_nat_core.c:313 Read of size 8 at addr ffffffff875bafe0 by task syz-executor.2/7748 CPU: 0 PID: 7748 Comm: syz-executor.2 Not tainted 4.14.199-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+0x14b/0x1f1 lib/dump_stack.c:58 print_address_description.cold.6+0x114/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.7+0x11a/0x2d4 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+0x19d1/0x1f70 net/netfilter/nf_nat_core.c:313 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+0x2c5/0x330 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/0xd2b net/netfilter/nf_conntrack_netlink.c:1964 nfnetlink_rcv_msg+0x872/0xa60 net/netfilter/nfnetlink.c:214 netlink_rcv_skb+0x12f/0x3b0 net/netlink/af_netlink.c:2433 nfnetlink_rcv+0x176/0x15b0 net/netfilter/nfnetlink.c:515 netlink_unicast_kernel net/netlink/af_netlink.c:1287 [inline] netlink_unicast+0x40b/0x610 net/netlink/af_netlink.c:1313 netlink_sendmsg+0x657/0xc60 net/netlink/af_netlink.c:1878 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xac/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+0x46/0xbb RIP: 0033:0x45cba9 RSP: 002b:00007f35d21c3c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004febe0 RCX: 000000000045cba9 RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000954 R14: 00000000004cc2bc R15: 00007f35d21c46d4 The buggy address belongs to the variable: nft_nat_ops+0x80/0xc0 Memory state around the buggy address: ffffffff875bae80: 06 fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00 ffffffff875baf00: 00 00 00 00 00 00 fa fa fa fa fa fa 00 00 00 00 >ffffffff875baf80: 00 00 00 00 00 00 00 fa fa fa fa fa 04 fa fa fa ^ ffffffff875bb000: fa fa fa fa 00 00 00 00 00 00 00 00 00 00 00 00 ffffffff875bb080: 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 00 00 ================================================================== IPv6: ADDRCONF(NETDEV_CHANGE): veth0_to_batadv: link becomes ready device veth0_macvtap entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): macvtap0: link is not ready device veth1_macvtap entered promiscuous mode IPv6: ADDRCONF(NETDEV_UP): macsec0: link is not ready IPv6: ADDRCONF(NETDEV_UP): veth0_to_batadv: link is not ready IPv6: ADDRCONF(NETDEV_CHANGE): macvtap0: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): macsec0: link becomes ready