bisecting fixing commit since 9fa690a2a016e1b55356835f047b952e67d3d73a building syzkaller on 93e5e33559b98e47f3743e6d907ca8444fbba5d4 testing commit 9fa690a2a016e1b55356835f047b952e67d3d73a with gcc (GCC) 8.1.0 kernel signature: 239e07f045f340f7fef7a5961cdd85d280d48033f41f8804aa6076a8a416d7d0 all runs: crashed: KASAN: slab-out-of-bounds Read in u32_mt testing current HEAD 773e2b1cd56a17bab4cdd4fe7db12f2140951668 testing commit 773e2b1cd56a17bab4cdd4fe7db12f2140951668 with gcc (GCC) 8.1.0 kernel signature: c3b2e6f21d26207e9666ac192cc482e62324ecaa424b486cc0040b9db4975d43 all runs: crashed: KASAN: slab-out-of-bounds Read in u32_mt revisions tested: 2, total time: 28m38.970524855s (build: 20m26.80704475s, test: 6m35.400169322s) the crash still happens on HEAD commit msg: Linux 4.14.178 crash: KASAN: slab-out-of-bounds Read in u32_mt ip6_tables: ip6tables: counters copy to user failed while replacing table IPv6: ADDRCONF(NETDEV_UP): veth0_vlan: link is not ready IPv6: ADDRCONF(NETDEV_UP): vlan0: link is not ready ================================================================== IPv6: ADDRCONF(NETDEV_UP): vlan1: link is not ready BUG: KASAN: slab-out-of-bounds in u32_match_it net/netfilter/xt_u32.c:79 [inline] BUG: KASAN: slab-out-of-bounds in u32_mt+0x656/0x760 net/netfilter/xt_u32.c:94 Read of size 4 at addr ffff888089d58ec0 by task syz-executor.3/7746 CPU: 0 PID: 7746 Comm: syz-executor.3 Not tainted 4.14.178-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+0x9/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_load4_noabort+0x14/0x20 mm/kasan/report.c:429 u32_match_it net/netfilter/xt_u32.c:79 [inline] u32_mt+0x656/0x760 net/netfilter/xt_u32.c:94 ip6t_do_table+0x7c9/0x1cd0 net/ipv6/netfilter/ip6_tables.c:324 ip6table_filter_hook+0x5d/0x90 net/ipv6/netfilter/ip6table_filter.c:41 nf_hook_entry_hookfn include/linux/netfilter.h:108 [inline] nf_hook_slow+0xa1/0x180 net/netfilter/core.c:467 nf_hook include/linux/netfilter.h:205 [inline] __ip6_local_out+0x392/0x720 net/ipv6/output_core.c:166 ip6_local_out+0x1d/0x130 net/ipv6/output_core.c:176 ip6_send_skb+0x92/0x2f0 net/ipv6/ip6_output.c:1688 udp_v6_send_skb+0x4b2/0x10b0 net/ipv6/udp.c:1081 udpv6_sendmsg+0x1c03/0x2450 net/ipv6/udp.c:1353 inet_sendmsg+0x108/0x440 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 kernel_sendmsg+0x26/0x30 net/socket.c:664 sock_no_sendpage+0xf7/0x130 net/core/sock.c:2572 kernel_sendpage+0x60/0xd0 net/socket.c:3407 sock_sendpage+0x6d/0xd0 net/socket.c:871 pipe_to_sendpage+0x206/0x420 fs/splice.c:451 splice_from_pipe_feed fs/splice.c:502 [inline] __splice_from_pipe+0x2cb/0x720 fs/splice.c:626 splice_from_pipe+0xb5/0x110 fs/splice.c:661 generic_splice_sendpage+0x10/0x20 fs/splice.c:832 do_splice_from fs/splice.c:851 [inline] do_splice fs/splice.c:1147 [inline] SYSC_splice fs/splice.c:1402 [inline] SyS_splice+0x6e9/0x1580 fs/splice.c:1382 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45b399 RSP: 002b:00007f62160b0c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000113 RAX: ffffffffffffffda RBX: 00007f62160b16d4 RCX: 000000000045b399 RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 000000000075bfc8 R08: 000000011fffffff R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000b6c R14: 00000000004ccecb R15: 000000000075bfd4 Allocated by task 7740: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x50/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] kvmalloc_node+0x70/0x80 mm/util.c:397 kvmalloc include/linux/mm.h:531 [inline] xt_alloc_table_info+0x60/0xd0 net/netfilter/x_tables.c:1062 do_replace net/ipv6/netfilter/ip6_tables.c:1146 [inline] do_ip6t_set_ctl+0x1af/0x3c4 net/ipv6/netfilter/ip6_tables.c:1685 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x5c/0xb0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x95/0xf0 net/ipv6/ipv6_sockglue.c:935 tcp_setsockopt+0x6a/0xd0 net/ipv4/tcp.c:2826 sock_common_setsockopt+0x73/0xf0 net/core/sock.c:2971 SYSC_setsockopt net/socket.c:1865 [inline] SyS_setsockopt+0x130/0x1f0 net/socket.c:1844 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff888089d58340 which belongs to the cache kmalloc-4096 of size 4096 The buggy address is located 2944 bytes inside of 4096-byte region [ffff888089d58340, ffff888089d59340) The buggy address belongs to the page: page:ffffea0002275600 count:1 mapcount:0 mapping:ffff888089d58340 index:0x0 compound_mapcount: 0 flags: 0xfffe0000008100(slab|head) raw: 00fffe0000008100 ffff888089d58340 0000000000000000 0000000100000001 raw: ffffea0002244920 ffffea000296a320 ffff8880aa800dc0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888089d58d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888089d58e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888089d58e80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ^ ffff888089d58f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888089d58f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================