IPv6: ADDRCONF(NETDEV_UP): batadv_slave_1: link is not ready batman_adv: batadv0: Interface activated: batadv_slave_1 IPv6: ADDRCONF(NETDEV_CHANGE): batadv_slave_1: link becomes ready IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready ================================================================== BUG: KASAN: use-after-free in nf_hook_slow+0x197/0x1a0 net/netfilter/core.c:466 Read of size 2 at addr ffff8880af416d80 by task syz-executor.3/9459 CPU: 0 PID: 9459 Comm: syz-executor.3 Not tainted 4.14.211-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+0x1b2/0x283 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351 overlayfs: unrecognized mount option "./bus" or missing value kasan_report mm/kasan/report.c:409 [inline] __asan_report_load2_noabort+0x68/0x70 mm/kasan/report.c:428 nf_hook_slow+0x197/0x1a0 net/netfilter/core.c:466 nf_hook include/linux/netfilter.h:205 [inline] NF_HOOK include/linux/netfilter.h:248 [inline] mld_sendpack+0x884/0xea0 net/ipv6/mcast.c:1660 mld_send_cr net/ipv6/mcast.c:1956 [inline] mld_ifc_timer_expire+0x57c/0xcd0 net/ipv6/mcast.c:2455 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1637 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650 __do_softirq+0x254/0xa1d kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:648 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1102 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793 RIP: 0010:arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xa3/0xe0 kernel/locking/spinlock.c:192 RSP: 0018:ffff88806e14f770 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff10 RAX: 1ffffffff11e1251 RBX: 0000000000000286 RCX: 1ffff1100dc281c5 RDX: dffffc0000000000 RSI: ffff88806e140e30 RDI: 0000000000000286 RBP: ffffffff88f79f60 R08: ffff8880ba52ac30 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff8880af5cd500 R14: 0000000000000000 R15: ffff88806e14f7c8 __rcu_read_unlock+0x158/0x160 kernel/rcu/update.c:260 rcu_read_unlock include/linux/rcupdate.h:684 [inline] inet6_csk_xmit+0x2a0/0x4d0 net/ipv6/inet6_connection_sock.c:141 dccp_transmit_skb+0x8d6/0x11e0 net/dccp/output.c:142 dccp_xmit_packet+0x1c9/0x6d0 net/dccp/output.c:281 dccp_write_xmit+0x140/0x1a0 net/dccp/output.c:363 dccp_sendmsg+0x6f6/0x890 net/dccp/proto.c:811 inet_sendmsg+0x11a/0x4e0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0x100 net/socket.c:656 ___sys_sendmsg+0x326/0x800 net/socket.c:2062 __sys_sendmmsg+0x129/0x330 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2178 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x45e0f9 RSP: 002b:00007f8f75e74c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000045e0f9 RDX: 04000000000000d0 RSI: 0000000020003d40 RDI: 0000000000000006 RBP: 000000000119bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffc1db4373f R14: 00007f8f75e759c0 R15: 000000000119bf8c Allocated by task 8020: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551 __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x4c/0x70 mm/slab.c:3689 kmalloc_node include/linux/slab.h:530 [inline] kvmalloc_node+0x46/0xd0 mm/util.c:397 kvmalloc include/linux/mm.h:531 [inline] kvzalloc include/linux/mm.h:539 [inline] allocate_hook_entries_size net/netfilter/core.c:82 [inline] nf_hook_entries_grow net/netfilter/core.c:125 [inline] nf_register_net_hook+0x25d/0xa40 net/netfilter/core.c:277 nf_register_net_hooks+0x47/0x96 net/netfilter/core.c:382 ip6t_register_table+0x1d3/0x280 net/ipv6/netfilter/ip6_tables.c:1799 ip6table_raw_table_init net/ipv6/netfilter/ip6table_raw.c:44 [inline] ip6table_raw_table_init+0x82/0xc0 net/ipv6/netfilter/ip6table_raw.c:33 xt_find_table_lock+0x247/0x3d0 net/netfilter/x_tables.c:1110 get_info+0xf5/0x530 net/ipv6/netfilter/ip6_tables.c:983 do_ip6t_get_ctl+0x125/0x7d0 net/ipv6/netfilter/ip6_tables.c:1709 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x62/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x146/0x1e0 net/ipv6/ipv6_sockglue.c:1376 tcp_getsockopt+0x7b/0xc0 net/ipv4/tcp.c:3257 SYSC_getsockopt net/socket.c:1896 [inline] SyS_getsockopt+0x102/0x1c0 net/socket.c:1878 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 8020: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xc9/0x250 mm/slab.c:3815 kvfree+0x45/0x50 mm/util.c:416 nf_register_net_hook+0x6c2/0xa40 net/netfilter/core.c:296 nf_register_net_hooks+0x47/0x96 net/netfilter/core.c:382 ip6t_register_table+0x1d3/0x280 net/ipv6/netfilter/ip6_tables.c:1799 ip6table_security_table_init net/ipv6/netfilter/ip6table_security.c:61 [inline] ip6table_security_table_init+0x82/0xc0 net/ipv6/netfilter/ip6table_security.c:50 xt_find_table_lock+0x247/0x3d0 net/netfilter/x_tables.c:1110 get_info+0xf5/0x530 net/ipv6/netfilter/ip6_tables.c:983 do_ip6t_get_ctl+0x125/0x7d0 net/ipv6/netfilter/ip6_tables.c:1709 nf_sockopt net/netfilter/nf_sockopt.c:104 [inline] nf_getsockopt+0x62/0xc0 net/netfilter/nf_sockopt.c:122 ipv6_getsockopt+0x146/0x1e0 net/ipv6/ipv6_sockglue.c:1376 tcp_getsockopt+0x7b/0xc0 net/ipv4/tcp.c:3257 SYSC_getsockopt net/socket.c:1896 [inline] SyS_getsockopt+0x102/0x1c0 net/socket.c:1878 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff8880af416d80 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 0 bytes inside of 128-byte region [ffff8880af416d80, ffff8880af416e00) The buggy address belongs to the page: page:ffffea0002bd0580 count:1 mapcount:0 mapping:ffff8880af416000 index:0x0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880af416000 0000000000000000 0000000100000015 raw: ffffea00025029a0 ffff88813fe81548 ffff88813fe80640 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880af416c80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff8880af416d00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc >ffff8880af416d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880af416e00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8880af416e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================