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 perf_output_read_group kernel/events/core.c:5895 [inline] BUG: KASAN: use-after-free in perf_output_read+0x1181/0x14f0 kernel/events/core.c:5930 Read of size 8 at addr ffff8881e62f3e48 by task syz-executor683/25408 CPU: 1 PID: 25408 Comm: syz-executor683 Not tainted 4.14.221-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/0x1e7 lib/dump_stack.c:58 print_address_description.cold.6+0x9/0x1ca mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold.7+0x11a/0x2d3 mm/kasan/report.c:393 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430 perf_output_read_group kernel/events/core.c:5895 [inline] perf_output_read+0x1181/0x14f0 kernel/events/core.c:5930 perf_output_sample+0x1276/0x1910 kernel/events/core.c:5972 __perf_event_output kernel/events/core.c:6285 [inline] perf_event_output_forward+0x103/0x1d0 kernel/events/core.c:6298 __perf_event_overflow+0x107/0x300 kernel/events/core.c:7547 perf_swevent_overflow+0x165/0x210 kernel/events/core.c:7623 perf_swevent_event+0x1f5/0x2f0 kernel/events/core.c:7656 do_perf_sw_event kernel/events/core.c:7764 [inline] ___perf_sw_event+0x26b/0x3f0 kernel/events/core.c:7795 __perf_sw_event+0x3c/0x60 kernel/events/core.c:7807 perf_sw_event include/linux/perf_event.h:1046 [inline] __do_page_fault+0x648/0xb10 arch/x86/mm/fault.c:1483 do_page_fault+0x64/0x400 arch/x86/mm/fault.c:1517 page_fault+0x25/0x50 arch/x86/entry/entry_64.S:1123 RIP: 0010:copy_user_enhanced_fast_string+0xe/0x20 arch/x86/lib/copy_user_64.S:181 RSP: 0018:ffff8881d62b7918 EFLAGS: 00010206 RAX: 0000000000000000 RBX: 0000000020ea2191 RCX: 0000000000000acb RDX: 000000000000393a RSI: 0000000020ea5000 RDI: ffff8881d6ab7535 RBP: ffff8881d62b7940 R08: 0000000000000000 R09: 00000000000000e5 R10: ffffed103ad56fff R11: ffff8881d6ab7fff R12: ffff8881d6ab46c6 R13: ffff8881e57c8440 R14: ffff8881d62b7db0 R15: ffff8881d62b7d60 _copy_from_iter_full+0x166/0x760 lib/iov_iter.c:608 copy_from_iter_full include/linux/uio.h:126 [inline] skb_do_copy_data_nocache include/net/sock.h:1889 [inline] skb_copy_to_page_nocache include/net/sock.h:1915 [inline] tcp_sendmsg_locked+0x193f/0x3a10 net/ipv4/tcp.c:1360 tcp_sendmsg+0x27/0x40 net/ipv4/tcp.c:1457 inet_sendmsg+0x108/0x440 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:656 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1e4/0x2c0 net/socket.c:1731 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x449179 RSP: 002b:00007f02374c4308 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00000000004ce4e8 RCX: 0000000000449179 RDX: ffffffffffffffef RSI: 0000000020d7cfcb RDI: 0000000000000004 RBP: 00000000004ce4e0 R08: 0000000000000000 R09: 0000000000000053 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000049d474 R13: 00007ffc21dec0df R14: 00007f02374c4400 R15: 0000000000022000 Allocated by task 5831: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x62/0xf0 mm/kasan/kasan.c:551 kasan_kmalloc+0xaf/0xc0 mm/kasan/kasan.c:536 __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] kvzalloc include/linux/mm.h:539 [inline] netif_alloc_netdev_queues net/core/dev.c:7526 [inline] alloc_netdev_mqs+0x5b9/0xb40 net/core/dev.c:8147 __ip_tunnel_create+0x1a5/0x4c0 net/ipv4/ip_tunnel.c:267 ip_tunnel_init_net+0x235/0x4c0 net/ipv4/ip_tunnel.c:1037 erspan_init_net+0x1d/0x20 net/ipv4/ip_gre.c:1565 ops_init+0x99/0x3a0 net/core/net_namespace.c:118 setup_net+0x233/0x4f0 net/core/net_namespace.c:295 copy_net_ns+0x16b/0x3c0 net/core/net_namespace.c:419 create_new_namespaces+0x476/0x740 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0x87/0x1a0 kernel/nsproxy.c:206 SYSC_unshare kernel/fork.c:2412 [inline] SyS_unshare+0x299/0x6d0 kernel/fork.c:2362 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 2365: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xab/0x190 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 kvfree+0x2c/0x30 mm/util.c:416 netif_free_tx_queues net/core/dev.c:7514 [inline] free_netdev+0x55/0x320 net/core/dev.c:8194 netdev_run_todo+0x522/0x6d0 net/core/dev.c:7952 rtnl_unlock+0x9/0x10 net/core/rtnetlink.c:106 ip_tunnel_delete_net+0x25d/0x3b0 net/ipv4/ip_tunnel.c:1084 erspan_exit_net+0xee/0x1a0 net/ipv4/ip_gre.c:1573 ops_exit_list.isra.3+0x8b/0x120 net/core/net_namespace.c:142 cleanup_net+0x39d/0x7f0 net/core/net_namespace.c:484 process_one_work+0x74f/0x1620 kernel/workqueue.c:2116 worker_thread+0xcc/0xee0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 The buggy address belongs to the object at ffff8881e62f3d40 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 264 bytes inside of 512-byte region [ffff8881e62f3d40, ffff8881e62f3f40) The buggy address belongs to the page: page:ffffea000798bcc0 count:1 mapcount:0 mapping:ffff8881e62f30c0 index:0xffff8881e62f3d40 flags: 0x17ffe0000000100(slab) raw: 017ffe0000000100 ffff8881e62f30c0 ffff8881e62f3d40 0000000100000005 raw: ffffea000773bfe0 ffffea0007737f60 ffff8881f6000940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881e62f3d00: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8881e62f3d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881e62f3e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881e62f3e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881e62f3f00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================