bridge0: port 3(ip6gretap0) entered disabled state device ip6gretap0 entered promiscuous mode bridge0: port 3(ip6gretap0) entered blocking state bridge0: port 3(ip6gretap0) entered forwarding state ================================================================== BUG: KASAN: use-after-free in primary_event_id kernel/events/core.c:1316 [inline] BUG: KASAN: use-after-free in perf_output_read_group kernel/events/core.c:5897 [inline] BUG: KASAN: use-after-free in perf_output_read+0x1046/0x1090 kernel/events/core.c:5932 Read of size 8 at addr ffff8880b34c4a60 by task syz-executor.0/11215 CPU: 0 PID: 11215 Comm: syz-executor.0 Not tainted 4.14.259-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/0x281 lib/dump_stack.c:58 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252 kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351 kasan_report mm/kasan/report.c:409 [inline] __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430 primary_event_id kernel/events/core.c:1316 [inline] perf_output_read_group kernel/events/core.c:5897 [inline] perf_output_read+0x1046/0x1090 kernel/events/core.c:5932 perf_output_sample+0xa28/0x16f0 kernel/events/core.c:5974 __perf_event_output kernel/events/core.c:6287 [inline] perf_event_output_forward+0xf8/0x1f0 kernel/events/core.c:6300 __perf_event_overflow+0x113/0x310 kernel/events/core.c:7549 perf_swevent_overflow kernel/events/core.c:7625 [inline] perf_swevent_event+0x299/0x460 kernel/events/core.c:7653 do_perf_sw_event kernel/events/core.c:7766 [inline] ___perf_sw_event+0x2a1/0x480 kernel/events/core.c:7797 __perf_sw_event+0x4f/0x100 kernel/events/core.c:7809 perf_sw_event include/linux/perf_event.h:1046 [inline] __do_page_fault+0x692/0xad0 arch/x86/mm/fault.c:1483 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:ffff88805ee3fa60 EFLAGS: 00050202 RAX: ffffed100bcf4869 RBX: 0000000000004341 RCX: 0000000000000e0c RDX: 0000000000004341 RSI: 0000000020fb1000 RDI: ffff88805e7a3535 RBP: 0000000020fadacb R08: 0000000000000001 R09: ffffed100bcf4868 R10: ffff88805e7a4340 R11: 0000000000000000 R12: ffff88805e7a0000 R13: 00007ffffffff000 R14: 0000000020fb1e0c R15: ffff88809df0cd00 copy_user_generic arch/x86/include/asm/uaccess_64.h:37 [inline] raw_copy_from_user arch/x86/include/asm/uaccess_64.h:55 [inline] copyin+0x99/0xc0 lib/iov_iter.c:146 _copy_from_iter_full+0x19c/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:1892 [inline] skb_copy_to_page_nocache include/net/sock.h:1918 [inline] tcp_sendmsg_locked+0x23fc/0x2ef0 net/ipv4/tcp.c:1360 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1457 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 SYSC_sendto net/socket.c:1763 [inline] SyS_sendto+0x1c7/0x2c0 net/socket.c:1731 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7f5b05131e99 RSP: 002b:00007f5b03aa7168 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f5b05244f60 RCX: 00007f5b05131e99 RDX: ffffffffffffffef RSI: 0000000020d7cfcb RDI: 0000000000000013 RBP: 00007f5b0518bff1 R08: 0000000000000000 R09: 0000000000000053 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff47ff4e7f R14: 00007f5b03aa7300 R15: 0000000000022000 Allocated by task 9984: 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_track_caller+0x4c/0x70 mm/slab.c:3696 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0x96/0x510 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:980 [inline] sock_wmalloc+0xa5/0xf0 net/core/sock.c:1953 pppoe_sendmsg+0x273/0x6a0 drivers/net/ppp/pppoe.c:876 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 Freed by task 9984: 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 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x5f6/0x820 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] kfree_skb+0xe7/0x390 net/core/skbuff.c:672 nf_hook_slow+0x137/0x1a0 net/netfilter/core.c:472 nf_hook include/linux/netfilter.h:205 [inline] NF_HOOK include/linux/netfilter.h:248 [inline] __br_forward+0x2c2/0x950 net/bridge/br_forward.c:111 br_flood+0x34e/0x410 net/bridge/br_forward.c:224 br_dev_xmit+0x950/0xd40 net/bridge/br_device.c:83 __netdev_start_xmit include/linux/netdevice.h:4051 [inline] netdev_start_xmit include/linux/netdevice.h:4060 [inline] xmit_one net/core/dev.c:3005 [inline] dev_hard_start_xmit+0x188/0x890 net/core/dev.c:3021 sch_direct_xmit+0x251/0x500 net/sched/sch_generic.c:186 qdisc_restart net/sched/sch_generic.c:249 [inline] __qdisc_run+0x25d/0xe00 net/sched/sch_generic.c:257 __dev_xmit_skb net/core/dev.c:3231 [inline] __dev_queue_xmit+0x13ac/0x2480 net/core/dev.c:3489 pppoe_sendmsg+0x55e/0x6a0 drivers/net/ppp/pppoe.c:909 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 The buggy address belongs to the object at ffff8880b34c4a00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 96 bytes inside of 512-byte region [ffff8880b34c4a00, ffff8880b34c4c00) The buggy address belongs to the page: page:ffffea0002cd3100 count:1 mapcount:0 mapping:ffff8880b34c4000 index:0xffff8880b34c4280 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffff8880b34c4000 ffff8880b34c4280 0000000100000001 raw: ffffea0002be6be0 ffffea0002c01560 ffff88813fe74940 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880b34c4900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b34c4980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880b34c4a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880b34c4a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880b34c4b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================